| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // FileSelector.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>
- /// %File selector dialog.
- /// </summary>
- public unsafe partial class FileSelector : UrhoObject
- {
- unsafe partial void OnFileSelectorCreated ();
- [Preserve]
- public FileSelector (IntPtr handle) : base (handle)
- {
- OnFileSelectorCreated ();
- }
- [Preserve]
- protected FileSelector (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnFileSelectorCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int FileSelector_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (FileSelector_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (FileSelector_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int FileSelector_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(FileSelector));
- return new StringHash (FileSelector_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(FileSelector));
- return Marshal.PtrToStringAnsi (FileSelector_GetTypeNameStatic ());
- }
- [Preserve]
- public FileSelector () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_FileSelector (IntPtr context);
- [Preserve]
- public FileSelector (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(FileSelector));
- handle = FileSelector_FileSelector ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnFileSelectorCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(FileSelector));
- FileSelector_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_SetDefaultStyle (IntPtr handle, IntPtr style);
- /// <summary>
- /// Set fileselector UI style.
- /// </summary>
- private void SetDefaultStyle (Urho.Resources.XmlFile style)
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_SetDefaultStyle (handle, (object)style == null ? IntPtr.Zero : style.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_SetTitle (IntPtr handle, string text);
- /// <summary>
- /// Set title text.
- /// </summary>
- private void SetTitle (string text)
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_SetTitle (handle, text);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_SetButtonTexts (IntPtr handle, string okText, string cancelText);
- /// <summary>
- /// Set button texts.
- /// </summary>
- public void SetButtonTexts (string okText, string cancelText)
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_SetButtonTexts (handle, okText, cancelText);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_SetPath (IntPtr handle, string path);
- /// <summary>
- /// Set current path.
- /// </summary>
- private void SetPath (string path)
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_SetPath (handle, path);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_SetFileName (IntPtr handle, string fileName);
- /// <summary>
- /// Set current filename.
- /// </summary>
- private void SetFileName (string fileName)
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_SetFileName (handle, fileName);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_SetDirectoryMode (IntPtr handle, bool enable);
- /// <summary>
- /// Set directory selection mode. Default false.
- /// </summary>
- private void SetDirectoryMode (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_SetDirectoryMode (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void FileSelector_UpdateElements (IntPtr handle);
- /// <summary>
- /// Update elements to layout properly. Call this after manually adjusting the sub-elements.
- /// </summary>
- public void UpdateElements ()
- {
- Runtime.ValidateRefCounted (this);
- FileSelector_UpdateElements (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetDefaultStyle (IntPtr handle);
- /// <summary>
- /// Return the UI style file.
- /// </summary>
- private Urho.Resources.XmlFile GetDefaultStyle ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Urho.Resources.XmlFile> (FileSelector_GetDefaultStyle (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetWindow (IntPtr handle);
- /// <summary>
- /// Return fileselector window.
- /// </summary>
- private Window GetWindow ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Window> (FileSelector_GetWindow (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetTitleText (IntPtr handle);
- /// <summary>
- /// Return window title text element.
- /// </summary>
- private Text GetTitleText ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Text> (FileSelector_GetTitleText (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetFileList (IntPtr handle);
- /// <summary>
- /// Return file list.
- /// </summary>
- private ListView GetFileList ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<ListView> (FileSelector_GetFileList (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetPathEdit (IntPtr handle);
- /// <summary>
- /// Return path editor.
- /// </summary>
- private LineEdit GetPathEdit ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<LineEdit> (FileSelector_GetPathEdit (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetFileNameEdit (IntPtr handle);
- /// <summary>
- /// Return filename editor.
- /// </summary>
- private LineEdit GetFileNameEdit ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<LineEdit> (FileSelector_GetFileNameEdit (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetFilterList (IntPtr handle);
- /// <summary>
- /// Return filter dropdown.
- /// </summary>
- private DropDownList GetFilterList ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<DropDownList> (FileSelector_GetFilterList (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetOKButton (IntPtr handle);
- /// <summary>
- /// Return OK button.
- /// </summary>
- private Button GetOKButton ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Button> (FileSelector_GetOKButton (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetCancelButton (IntPtr handle);
- /// <summary>
- /// Return cancel button.
- /// </summary>
- private Button GetCancelButton ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Button> (FileSelector_GetCancelButton (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetCloseButton (IntPtr handle);
- /// <summary>
- /// Return close button.
- /// </summary>
- private Button GetCloseButton ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Button> (FileSelector_GetCloseButton (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetTitle (IntPtr handle);
- /// <summary>
- /// Return window title.
- /// </summary>
- private string GetTitle ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (FileSelector_GetTitle (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetPath (IntPtr handle);
- /// <summary>
- /// Return current path.
- /// </summary>
- private string GetPath ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (FileSelector_GetPath (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetFileName (IntPtr handle);
- /// <summary>
- /// Return current filename.
- /// </summary>
- private string GetFileName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (FileSelector_GetFileName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr FileSelector_GetFilter (IntPtr handle);
- /// <summary>
- /// Return current filter.
- /// </summary>
- private string GetFilter ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (FileSelector_GetFilter (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint FileSelector_GetFilterIndex (IntPtr handle);
- /// <summary>
- /// Return current filter index.
- /// </summary>
- private uint GetFilterIndex ()
- {
- Runtime.ValidateRefCounted (this);
- return FileSelector_GetFilterIndex (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool FileSelector_GetDirectoryMode (IntPtr handle);
- /// <summary>
- /// Return directory mode flag.
- /// </summary>
- private bool GetDirectoryMode ()
- {
- Runtime.ValidateRefCounted (this);
- return FileSelector_GetDirectoryMode (handle);
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return the UI style file.
- /// Or
- /// Set fileselector UI style.
- /// </summary>
- public Urho.Resources.XmlFile DefaultStyle {
- get {
- return GetDefaultStyle ();
- }
- set {
- SetDefaultStyle (value);
- }
- }
- /// <summary>
- /// Return window title.
- /// Or
- /// Set title text.
- /// </summary>
- public string Title {
- get {
- return GetTitle ();
- }
- set {
- SetTitle (value);
- }
- }
- /// <summary>
- /// Return current path.
- /// Or
- /// Set current path.
- /// </summary>
- public string Path {
- get {
- return GetPath ();
- }
- set {
- SetPath (value);
- }
- }
- /// <summary>
- /// Return current filename.
- /// Or
- /// Set current filename.
- /// </summary>
- public string FileName {
- get {
- return GetFileName ();
- }
- set {
- SetFileName (value);
- }
- }
- /// <summary>
- /// Return directory mode flag.
- /// Or
- /// Set directory selection mode. Default false.
- /// </summary>
- public bool DirectoryMode {
- get {
- return GetDirectoryMode ();
- }
- set {
- SetDirectoryMode (value);
- }
- }
- /// <summary>
- /// Return fileselector window.
- /// </summary>
- public Window Window {
- get {
- return GetWindow ();
- }
- }
- /// <summary>
- /// Return window title text element.
- /// </summary>
- public Text TitleText {
- get {
- return GetTitleText ();
- }
- }
- /// <summary>
- /// Return file list.
- /// </summary>
- public ListView FileList {
- get {
- return GetFileList ();
- }
- }
- /// <summary>
- /// Return path editor.
- /// </summary>
- public LineEdit PathEdit {
- get {
- return GetPathEdit ();
- }
- }
- /// <summary>
- /// Return filename editor.
- /// </summary>
- public LineEdit FileNameEdit {
- get {
- return GetFileNameEdit ();
- }
- }
- /// <summary>
- /// Return filter dropdown.
- /// </summary>
- public DropDownList FilterList {
- get {
- return GetFilterList ();
- }
- }
- /// <summary>
- /// Return OK button.
- /// </summary>
- public Button OKButton {
- get {
- return GetOKButton ();
- }
- }
- /// <summary>
- /// Return cancel button.
- /// </summary>
- public Button CancelButton {
- get {
- return GetCancelButton ();
- }
- }
- /// <summary>
- /// Return close button.
- /// </summary>
- public Button CloseButton {
- get {
- return GetCloseButton ();
- }
- }
- /// <summary>
- /// Return current filter.
- /// </summary>
- public string Filter {
- get {
- return GetFilter ();
- }
- }
- /// <summary>
- /// Return current filter index.
- /// </summary>
- public uint FilterIndex {
- get {
- return GetFilterIndex ();
- }
- }
- }
- }
|