web_sys/features/
gen_BoxQuadOptions.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = BoxQuadOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `BoxQuadOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
12 pub type BoxQuadOptions;
13 #[cfg(feature = "CssBoxType")]
14 #[doc = "Get the `box` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"]
17 #[wasm_bindgen(method, getter = "box")]
18 pub fn get_box(this: &BoxQuadOptions) -> Option<CssBoxType>;
19 #[cfg(feature = "CssBoxType")]
20 #[doc = "Change the `box` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"]
23 #[wasm_bindgen(method, setter = "box")]
24 pub fn set_box(this: &BoxQuadOptions, val: CssBoxType);
25 #[doc = "Get the `relativeTo` field of this object."]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
28 #[wasm_bindgen(method, getter = "relativeTo")]
29 pub fn get_relative_to(this: &BoxQuadOptions) -> Option<::js_sys::Object>;
30 #[doc = "Change the `relativeTo` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
33 #[wasm_bindgen(method, setter = "relativeTo")]
34 pub fn set_relative_to(this: &BoxQuadOptions, val: &::js_sys::Object);
35 #[cfg(feature = "Text")]
36 #[doc = "Change the `relativeTo` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
39 #[wasm_bindgen(method, setter = "relativeTo")]
40 pub fn set_relative_to_text(this: &BoxQuadOptions, val: &Text);
41 #[cfg(feature = "Element")]
42 #[doc = "Change the `relativeTo` field of this object."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
45 #[wasm_bindgen(method, setter = "relativeTo")]
46 pub fn set_relative_to_element(this: &BoxQuadOptions, val: &Element);
47 #[cfg(feature = "Document")]
48 #[doc = "Change the `relativeTo` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
51 #[wasm_bindgen(method, setter = "relativeTo")]
52 pub fn set_relative_to_document(this: &BoxQuadOptions, val: &Document);
53}
54impl BoxQuadOptions {
55 #[doc = "Construct a new `BoxQuadOptions`."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
58 pub fn new() -> Self {
59 #[allow(unused_mut)]
60 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
61 ret
62 }
63 #[cfg(feature = "CssBoxType")]
64 #[deprecated = "Use `set_box()` instead."]
65 pub fn box_(&mut self, val: CssBoxType) -> &mut Self {
66 self.set_box(val);
67 self
68 }
69 #[deprecated = "Use `set_relative_to()` instead."]
70 pub fn relative_to(&mut self, val: &::js_sys::Object) -> &mut Self {
71 self.set_relative_to(val);
72 self
73 }
74}
75impl Default for BoxQuadOptions {
76 fn default() -> Self {
77 Self::new()
78 }
79}