Skip to main content

engage/generated/unity_engine/
texteditor.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-texteditor-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        r#enum::{Enum, IEnum},
11        valuetype::{IValueType, ValueType},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/texteditor/TextEditor_DblClickSnapping.md"))]
15    #[repr(C)]
16    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17    pub struct TextEditor_DblClickSnapping {
18        pub value: u8,
19    }
20    impl ::unity::ClassIdentity for TextEditor_DblClickSnapping {
21        const NAME: &'static str = "TextEditor.DblClickSnapping";
22        const NAMESPACE: &'static str = "UnityEngine";
23
24        fn class() -> ::unity::Class {
25            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27        }
28    }
29    impl ::unity::IlType for TextEditor_DblClickSnapping {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34    impl TextEditor_DblClickSnapping {
35        pub fn words() -> Self {
36            Self { value: 0 }
37        }
38
39        pub fn paragraphs() -> Self {
40            Self { value: 1 }
41        }
42    }
43
44    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/texteditor/TextEditor.md"))]
45    #[::unity::class(namespace = "UnityEngine", name = "TextEditor")]
46    #[parent(crate::system::object::Object)]
47    pub struct TextEditor {
48        #[offset(16)]
49        #[rename(name = "keyboardOnScreen")]
50        pub keyboard_on_screen: crate::unity_engine::touchscreenkeyboard::TouchScreenKeyboard,
51        #[offset(24)]
52        #[rename(name = "controlID")]
53        pub control_id: i32,
54        #[offset(32)]
55        #[rename(name = "style")]
56        pub style: crate::unity_engine::guistyle::GUIStyle,
57        #[offset(40)]
58        #[rename(name = "multiline")]
59        pub multiline: bool,
60        #[offset(41)]
61        #[rename(name = "hasHorizontalCursorPos")]
62        pub has_horizontal_cursor_pos: bool,
63        #[offset(42)]
64        #[rename(name = "isPasswordField")]
65        pub is_password_field: bool,
66        #[offset(44)]
67        #[rename(name = "scrollOffset")]
68        pub scroll_offset: crate::unity_engine::vector2::Vector2,
69        #[offset(56)]
70        #[rename(name = "m_Content")]
71        pub m_content: crate::unity_engine::guicontent::GUIContent,
72        #[offset(64)]
73        #[rename(name = "m_CursorIndex")]
74        pub m_cursor_index: i32,
75        #[offset(68)]
76        #[rename(name = "m_SelectIndex")]
77        pub m_select_index: i32,
78        #[offset(72)]
79        #[rename(name = "m_RevealCursor")]
80        pub m_reveal_cursor: bool,
81        #[offset(73)]
82        #[rename(name = "m_MouseDragSelectsWholeWords")]
83        pub m_mouse_drag_selects_whole_words: bool,
84        #[offset(76)]
85        #[rename(name = "m_DblClickInitPos")]
86        pub m_dbl_click_init_pos: i32,
87        #[offset(80)]
88        #[rename(name = "m_DblClickSnap")]
89        pub m_dbl_click_snap: crate::unity_engine::texteditor::TextEditor_DblClickSnapping,
90        #[offset(81)]
91        #[rename(name = "m_bJustSelected")]
92        pub m_b_just_selected: bool,
93        #[offset(84)]
94        #[rename(name = "m_iAltCursorPos")]
95        pub m_i_alt_cursor_pos: i32,
96    }
97}
98
99#[cfg(feature = "unity_engine-texteditor-types")]
100pub use __types::*;
101
102#[cfg(feature = "unity_engine-texteditor")]
103pub trait ITextEditorMethods: ITextEditor {
104    #[doc = "`.ctor()` overload"]
105    fn ctor(self) -> () {
106        unsafe {
107            let __receiver = <TextEditor as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            ::unity::il2cpp_call!((::unity::module_base()+0x3c53b90usize)as*mut u8,();
109(TextEditor)__receiver)
110        }
111    }
112}
113
114#[cfg(feature = "unity_engine-texteditor")]
115impl<__T: ITextEditor> ITextEditorMethods for __T {}
116
117#[cfg(feature = "unity_engine-texteditor")]
118impl TextEditor {
119    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
120        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
121    }
122}
123
124#[cfg(feature = "unity_engine-texteditor")]
125impl TextEditor {
126    #[doc = "`.ctor()` — no args"]
127    pub fn new() -> Self {
128        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
129            panic!(
130                "{}
131::{}
132 failed to instantiate",
133                ::core::stringify!(TextEditor),
134                ::core::stringify!(new),
135            )
136        });
137        <Self as ITextEditorMethods>::ctor(this);
138        this
139    }
140}
141
142#[cfg(feature = "unity_engine-texteditor")]
143#[doc(hidden)]
144pub mod prelude {
145    pub use super::{ITextEditor, ITextEditorMethods, TextEditor, TextEditor_DblClickSnapping};
146    #[cfg(feature = "system-object")]
147    pub use crate::system::object::IObjectMethods;
148    #[cfg(feature = "system-enum")]
149    pub use crate::system::r#enum::IEnumMethods;
150    #[cfg(feature = "system-valuetype")]
151    pub use crate::system::valuetype::IValueTypeMethods;
152    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
153}