Skip to main content

engage/generated/unity_engine/
guiwordwrapsizer.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-guiwordwrapsizer-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::guilayoutentry::{GUILayoutEntry, IGUILayoutEntry},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/guiwordwrapsizer/GUIWordWrapSizer.md"))]
14    #[::unity::class(namespace = "UnityEngine", name = "GUIWordWrapSizer")]
15    #[parent(crate::unity_engine::guilayoutentry::GUILayoutEntry)]
16    pub struct GUIWordWrapSizer {
17        #[offset(72)]
18        #[rename(name = "m_Content")]
19        pub m_content: crate::unity_engine::guicontent::GUIContent,
20        #[offset(80)]
21        #[rename(name = "m_ForcedMinHeight")]
22        pub m_forced_min_height: f32,
23        #[offset(84)]
24        #[rename(name = "m_ForcedMaxHeight")]
25        pub m_forced_max_height: f32,
26    }
27}
28
29#[cfg(feature = "unity_engine-guiwordwrapsizer-types")]
30pub use __types::*;
31
32#[cfg(feature = "unity_engine-guiwordwrapsizer")]
33pub trait IGUIWordWrapSizerMethods: IGUIWordWrapSizer {
34    #[doc = "`.ctor(crate::unity_engine::guistyle::GUIStyle, crate::unity_engine::guicontent::GUIContent, ::unity::Array<crate::unity_engine::guilayoutoption::GUILayoutOption>)` overload"]
35    fn ctor(
36        self,
37        style: impl ::core::convert::Into<crate::unity_engine::guistyle::GUIStyle>,
38        content: impl ::core::convert::Into<crate::unity_engine::guicontent::GUIContent>,
39        options: impl ::core::convert::Into<::unity::Array<crate::unity_engine::guilayoutoption::GUILayoutOption>>,
40    ) -> () {
41        unsafe {
42            let __receiver = <GUIWordWrapSizer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43            ::unity::il2cpp_call!((::unity::module_base()+0x3c4ab50usize)as*mut u8,();
44(GUIWordWrapSizer)__receiver,(crate::unity_engine::guistyle::GUIStyle)::core::convert::Into::into(style),(crate::unity_engine::guicontent::GUIContent)::core::convert::Into::into(content),(::unity::Array<crate::unity_engine::guilayoutoption::GUILayoutOption>)::core::convert::Into::into(options))
45        }
46    }
47    #[doc = "`CalcWidth()` overload"]
48    fn calc_width(self) -> () {
49        unsafe {
50            let __receiver = <GUIWordWrapSizer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51            {
52                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
53                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
54                    panic!(
55                        "unity: virtual slot {}
56 out of range (vtable len {}
57) on the runtime class behind {}
58 (method `{}
59`)",
60                        8usize,
61                        __vt.len(),
62                        <GUIWordWrapSizer as ::unity::ClassIdentity>::NAME,
63                        "CalcWidth",
64                    )
65                });
66                let __inner: extern "C" fn(GUIWordWrapSizer, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
67                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
68                __inner(__receiver, __mi)
69            }
70        }
71    }
72    #[doc = "`CalcHeight()` overload"]
73    fn calc_height(self) -> () {
74        unsafe {
75            let __receiver = <GUIWordWrapSizer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76            {
77                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
78                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
79                    panic!(
80                        "unity: virtual slot {}
81 out of range (vtable len {}
82) on the runtime class behind {}
83 (method `{}
84`)",
85                        9usize,
86                        __vt.len(),
87                        <GUIWordWrapSizer as ::unity::ClassIdentity>::NAME,
88                        "CalcHeight",
89                    )
90                });
91                let __inner: extern "C" fn(GUIWordWrapSizer, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
92                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
93                __inner(__receiver, __mi)
94            }
95        }
96    }
97}
98
99#[cfg(feature = "unity_engine-guiwordwrapsizer")]
100impl<__T: IGUIWordWrapSizer> IGUIWordWrapSizerMethods for __T {}
101
102#[cfg(feature = "unity_engine-guiwordwrapsizer")]
103impl GUIWordWrapSizer {
104    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
105        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
106    }
107
108    pub fn calc_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
109        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
110    }
111
112    pub fn calc_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
113        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
114    }
115}
116
117#[cfg(feature = "unity_engine-guiwordwrapsizer")]
118impl GUIWordWrapSizer {
119    #[doc = "Direct (non-virtual) call to `GUIWordWrapSizer`'s own `CalcWidth`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
120    pub unsafe fn calc_width(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
121        let __mi = Self::calc_width_method_info();
122        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
123        __inner(this.into(), ::core::option::Option::None)
124    }
125
126    #[doc = "Direct (non-virtual) call to `GUIWordWrapSizer`'s own `CalcHeight`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
127    pub unsafe fn calc_height(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
128        let __mi = Self::calc_height_method_info();
129        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
130        __inner(this.into(), ::core::option::Option::None)
131    }
132}
133
134#[cfg(feature = "unity_engine-guiwordwrapsizer")]
135impl GUIWordWrapSizer {
136    #[doc = "`.ctor(crate::unity_engine::guistyle::GUIStyle, crate::unity_engine::guicontent::GUIContent, ::unity::Array<crate::unity_engine::guilayoutoption::GUILayoutOption>)` — overload selector"]
137    pub fn new(
138        style: crate::unity_engine::guistyle::GUIStyle,
139        content: crate::unity_engine::guicontent::GUIContent,
140        options: ::unity::Array<crate::unity_engine::guilayoutoption::GUILayoutOption>,
141    ) -> Self {
142        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
143            panic!(
144                "{}
145::{}
146 failed to instantiate",
147                ::core::stringify!(GUIWordWrapSizer),
148                ::core::stringify!(new),
149            )
150        });
151        <Self as IGUIWordWrapSizerMethods>::ctor(this, style, content, options);
152        this
153    }
154}
155
156#[cfg(feature = "unity_engine-guiwordwrapsizer")]
157#[doc(hidden)]
158pub mod prelude {
159    pub use super::{GUIWordWrapSizer, IGUIWordWrapSizer, IGUIWordWrapSizerMethods};
160    #[cfg(feature = "system-object")]
161    pub use crate::system::object::IObjectMethods;
162    #[cfg(feature = "unity_engine-guilayoutentry")]
163    pub use crate::unity_engine::guilayoutentry::IGUILayoutEntryMethods;
164    pub use crate::{system::object::IObject, unity_engine::guilayoutentry::IGUILayoutEntry};
165}