// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.StackSwitcher.html).
pub type StackSwitcher
///|
pub(open) trait IStackSwitcher {
fn as_stack_switcher(Self) -> StackSwitcher
fn get_stack(Self) -> Stack? = _
fn set_stack(Self, &IStack?) -> Unit = _
}
///|
pub impl IStackSwitcher for StackSwitcher with fn as_stack_switcher(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.StackSwitcher.new.html).
pub extern "c" fn StackSwitcher::new() -> StackSwitcher = "moonbit_gtk_stack_switcher_new"
///|
#borrow(self_)
extern "c" fn moonbit_gtk_stack_switcher_get_stack(
self_ : StackSwitcher,
) -> @glib.Nullable[Stack] = "moonbit_gtk_stack_switcher_get_stack"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.StackSwitcher.get_stack.html).
pub fn StackSwitcher::get_stack(self : StackSwitcher) -> Stack? {
let raw_result = moonbit_gtk_stack_switcher_get_stack(self)
raw_result.to_option()
}
///|
#borrow(self_, stack)
extern "c" fn moonbit_gtk_stack_switcher_set_stack(
self_ : StackSwitcher,
stack : @glib.Nullable[Stack],
) = "moonbit_gtk_stack_switcher_set_stack"
///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.StackSwitcher.set_stack.html).
pub fn StackSwitcher::set_stack(self : StackSwitcher, stack : &IStack?) -> Unit {
moonbit_gtk_stack_switcher_set_stack(
self,
match stack {
Some(v) => @glib.Nullable::some(v.as_stack())
None => @glib.Nullable::null()
},
)
}
///|
impl IStackSwitcher with fn get_stack(self) -> Stack? {
self.as_stack_switcher().get_stack()
}
///|
impl IStackSwitcher with fn set_stack(self, stack) -> Unit {
self.as_stack_switcher().set_stack(stack)
}
///|
pub fn StackSwitcher::as_widget(self : StackSwitcher) -> Widget = "%identity"
///|
pub impl IWidget for StackSwitcher with fn as_widget(self) {
self.as_widget()
}
///|
pub fn StackSwitcher::as_gobject_object(
self : StackSwitcher,
) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for StackSwitcher with fn as_object(self) {
self.as_gobject_object()
}
///|
pub fn StackSwitcher::as_orientable(self : StackSwitcher) -> Orientable = "%identity"
///|
pub impl IOrientable for StackSwitcher with fn as_orientable(self) {
self.as_orientable()
}