engage/generated/unity_engine/
guiscrollgroup.rs1#[cfg(feature = "unity_engine-guiscrollgroup-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::{
11 guilayoutentry::{GUILayoutEntry, IGUILayoutEntry},
12 guilayoutgroup::{GUILayoutGroup, IGUILayoutGroup},
13 },
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/guiscrollgroup/GUIScrollGroup.md"))]
17 #[::unity::class(namespace = "UnityEngine", name = "GUIScrollGroup")]
18 #[parent(crate::unity_engine::guilayoutgroup::GUILayoutGroup)]
19 pub struct GUIScrollGroup {
20 #[offset(144)]
21 #[rename(name = "calcMinWidth")]
22 pub calc_min_width: f32,
23 #[offset(148)]
24 #[rename(name = "calcMaxWidth")]
25 pub calc_max_width: f32,
26 #[offset(152)]
27 #[rename(name = "calcMinHeight")]
28 pub calc_min_height: f32,
29 #[offset(156)]
30 #[rename(name = "calcMaxHeight")]
31 pub calc_max_height: f32,
32 #[offset(160)]
33 #[rename(name = "clientWidth")]
34 pub client_width: f32,
35 #[offset(164)]
36 #[rename(name = "clientHeight")]
37 pub client_height: f32,
38 #[offset(168)]
39 #[rename(name = "allowHorizontalScroll")]
40 pub allow_horizontal_scroll: bool,
41 #[offset(169)]
42 #[rename(name = "allowVerticalScroll")]
43 pub allow_vertical_scroll: bool,
44 #[offset(170)]
45 #[rename(name = "needsHorizontalScrollbar")]
46 pub needs_horizontal_scrollbar: bool,
47 #[offset(171)]
48 #[rename(name = "needsVerticalScrollbar")]
49 pub needs_vertical_scrollbar: bool,
50 #[offset(176)]
51 #[rename(name = "horizontalScrollbar")]
52 pub horizontal_scrollbar: crate::unity_engine::guistyle::GUIStyle,
53 #[offset(184)]
54 #[rename(name = "verticalScrollbar")]
55 pub vertical_scrollbar: crate::unity_engine::guistyle::GUIStyle,
56 }
57}
58
59#[cfg(feature = "unity_engine-guiscrollgroup-types")]
60pub use __types::*;
61
62#[cfg(feature = "unity_engine-guiscrollgroup")]
63pub trait IGUIScrollGroupMethods: IGUIScrollGroup {
64 #[doc = "`.ctor()` overload"]
65 fn ctor(self) -> () {
66 unsafe {
67 let __receiver = <GUIScrollGroup as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68 ::unity::il2cpp_call!((::unity::module_base()+0x3c4ae00usize)as*mut u8,();
69(GUIScrollGroup)__receiver)
70 }
71 }
72 #[doc = "`CalcWidth()` overload"]
73 fn calc_width(self) -> () {
74 unsafe {
75 let __receiver = <GUIScrollGroup 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(8usize).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 8usize,
86 __vt.len(),
87 <GUIScrollGroup as ::unity::ClassIdentity>::NAME,
88 "CalcWidth",
89 )
90 });
91 let __inner: extern "C" fn(GUIScrollGroup, ::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 #[doc = "`SetHorizontal(f32, f32)` overload"]
98 fn set_horizontal(self, x: impl ::core::convert::Into<f32>, width: impl ::core::convert::Into<f32>) -> () {
99 unsafe {
100 let __receiver = <GUIScrollGroup as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
101 {
102 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
103 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
104 panic!(
105 "unity: virtual slot {}
106 out of range (vtable len {}
107) on the runtime class behind {}
108 (method `{}
109`)",
110 10usize,
111 __vt.len(),
112 <GUIScrollGroup as ::unity::ClassIdentity>::NAME,
113 "SetHorizontal",
114 )
115 });
116 let __inner: extern "C" fn(GUIScrollGroup, f32, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
117 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
118 __inner(__receiver, ::core::convert::Into::into(x), ::core::convert::Into::into(width), __mi)
119 }
120 }
121 }
122 #[doc = "`CalcHeight()` overload"]
123 fn calc_height(self) -> () {
124 unsafe {
125 let __receiver = <GUIScrollGroup as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
126 {
127 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
128 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
129 panic!(
130 "unity: virtual slot {}
131 out of range (vtable len {}
132) on the runtime class behind {}
133 (method `{}
134`)",
135 9usize,
136 __vt.len(),
137 <GUIScrollGroup as ::unity::ClassIdentity>::NAME,
138 "CalcHeight",
139 )
140 });
141 let __inner: extern "C" fn(GUIScrollGroup, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
142 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
143 __inner(__receiver, __mi)
144 }
145 }
146 }
147 #[doc = "`SetVertical(f32, f32)` overload"]
148 fn set_vertical(self, y: impl ::core::convert::Into<f32>, height: impl ::core::convert::Into<f32>) -> () {
149 unsafe {
150 let __receiver = <GUIScrollGroup as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
151 {
152 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
153 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
154 panic!(
155 "unity: virtual slot {}
156 out of range (vtable len {}
157) on the runtime class behind {}
158 (method `{}
159`)",
160 11usize,
161 __vt.len(),
162 <GUIScrollGroup as ::unity::ClassIdentity>::NAME,
163 "SetVertical",
164 )
165 });
166 let __inner: extern "C" fn(GUIScrollGroup, f32, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
167 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
168 __inner(__receiver, ::core::convert::Into::into(y), ::core::convert::Into::into(height), __mi)
169 }
170 }
171 }
172}
173
174#[cfg(feature = "unity_engine-guiscrollgroup")]
175impl<__T: IGUIScrollGroup> IGUIScrollGroupMethods for __T {}
176
177#[cfg(feature = "unity_engine-guiscrollgroup")]
178impl GUIScrollGroup {
179 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
181 }
182
183 pub fn calc_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
185 }
186
187 pub fn set_horizontal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
189 }
190
191 pub fn calc_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
193 }
194
195 pub fn set_vertical_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
197 }
198}
199
200#[cfg(feature = "unity_engine-guiscrollgroup")]
201impl GUIScrollGroup {
202 #[doc = "Direct (non-virtual) call to `GUIScrollGroup`'s own `CalcWidth`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
203 pub unsafe fn calc_width(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
204 let __mi = Self::calc_width_method_info();
205 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
206 __inner(this.into(), ::core::option::Option::None)
207 }
208
209 #[doc = "Direct (non-virtual) call to `GUIScrollGroup`'s own `SetHorizontal`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
210 pub unsafe fn set_horizontal(this: impl ::core::convert::Into<::unity::IlInstance>, x: f32, width: f32) -> () {
211 let __mi = Self::set_horizontal_method_info();
212 let __inner: extern "C" fn(::unity::IlInstance, f32, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
213 __inner(this.into(), x, width, ::core::option::Option::None)
214 }
215
216 #[doc = "Direct (non-virtual) call to `GUIScrollGroup`'s own `CalcHeight`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
217 pub unsafe fn calc_height(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
218 let __mi = Self::calc_height_method_info();
219 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
220 __inner(this.into(), ::core::option::Option::None)
221 }
222
223 #[doc = "Direct (non-virtual) call to `GUIScrollGroup`'s own `SetVertical`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
224 pub unsafe fn set_vertical(this: impl ::core::convert::Into<::unity::IlInstance>, y: f32, height: f32) -> () {
225 let __mi = Self::set_vertical_method_info();
226 let __inner: extern "C" fn(::unity::IlInstance, f32, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
227 __inner(this.into(), y, height, ::core::option::Option::None)
228 }
229}
230
231#[cfg(feature = "unity_engine-guiscrollgroup")]
232impl GUIScrollGroup {
233 #[doc = "`.ctor()` — no args"]
234 pub fn new() -> Self {
235 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
236 panic!(
237 "{}
238::{}
239 failed to instantiate",
240 ::core::stringify!(GUIScrollGroup),
241 ::core::stringify!(new),
242 )
243 });
244 <Self as IGUIScrollGroupMethods>::ctor(this);
245 this
246 }
247}
248
249#[cfg(feature = "unity_engine-guiscrollgroup")]
250#[doc(hidden)]
251pub mod prelude {
252 pub use super::{GUIScrollGroup, IGUIScrollGroup, IGUIScrollGroupMethods};
253 #[cfg(feature = "system-object")]
254 pub use crate::system::object::IObjectMethods;
255 #[cfg(feature = "unity_engine-guilayoutentry")]
256 pub use crate::unity_engine::guilayoutentry::IGUILayoutEntryMethods;
257 #[cfg(feature = "unity_engine-guilayoutgroup")]
258 pub use crate::unity_engine::guilayoutgroup::IGUILayoutGroupMethods;
259 pub use crate::{
260 system::object::IObject,
261 unity_engine::{guilayoutentry::IGUILayoutEntry, guilayoutgroup::IGUILayoutGroup},
262 };
263}