// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/class.Box.html).
pub type Box

///|
pub(open) trait IBox {
  fn as_box(Self) -> Box
  fn append(Self, &IWidget) -> Unit = _
  fn get_baseline_child(Self) -> Int = _
  fn get_baseline_position(Self) -> BaselinePosition = _
  fn get_homogeneous(Self) -> Bool = _
  fn get_spacing(Self) -> Int = _
  fn insert_child_after(Self, &IWidget, &IWidget?) -> Unit = _
  fn prepend(Self, &IWidget) -> Unit = _
  fn remove(Self, &IWidget) -> Unit = _
  fn reorder_child_after(Self, &IWidget, &IWidget?) -> Unit = _
  fn set_baseline_child(Self, Int) -> Unit = _
  fn set_baseline_position(Self, BaselinePosition) -> Unit = _
  fn set_homogeneous(Self, Bool) -> Unit = _
  fn set_spacing(Self, Int) -> Unit = _
}

///|
pub impl IBox for Box with fn as_box(self) {
  self
}

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/ctor.Box.new.html).
pub extern "c" fn Box::new(orientation : Orientation, spacing : Int) -> Box = "moonbit_gtk_box_new"

///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_box_append(self_ : Box, child : Widget) = "moonbit_gtk_box_append"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.append.html).
pub fn Box::append(self : Box, child : &IWidget) -> Unit {
  moonbit_gtk_box_append(self, child.as_widget())
}

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.get_baseline_child.html).
#borrow(self)
pub extern "c" fn Box::get_baseline_child(self : Box) -> Int = "moonbit_gtk_box_get_baseline_child"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.get_baseline_position.html).
#borrow(self)
pub extern "c" fn Box::get_baseline_position(self : Box) -> BaselinePosition = "moonbit_gtk_box_get_baseline_position"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.get_homogeneous.html).
#borrow(self)
pub extern "c" fn Box::get_homogeneous(self : Box) -> Bool = "moonbit_gtk_box_get_homogeneous"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.get_spacing.html).
#borrow(self)
pub extern "c" fn Box::get_spacing(self : Box) -> Int = "moonbit_gtk_box_get_spacing"

///|
#borrow(self_, child, sibling)
extern "c" fn moonbit_gtk_box_insert_child_after(
  self_ : Box,
  child : Widget,
  sibling : @glib.Nullable[Widget],
) = "moonbit_gtk_box_insert_child_after"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.insert_child_after.html).
pub fn Box::insert_child_after(
  self : Box,
  child : &IWidget,
  sibling : &IWidget?,
) -> Unit {
  moonbit_gtk_box_insert_child_after(
    self,
    child.as_widget(),
    match sibling {
      Some(v) => @glib.Nullable::some(v.as_widget())
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_box_prepend(self_ : Box, child : Widget) = "moonbit_gtk_box_prepend"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.prepend.html).
pub fn Box::prepend(self : Box, child : &IWidget) -> Unit {
  moonbit_gtk_box_prepend(self, child.as_widget())
}

///|
#borrow(self_, child)
extern "c" fn moonbit_gtk_box_remove(self_ : Box, child : Widget) = "moonbit_gtk_box_remove"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.remove.html).
pub fn Box::remove(self : Box, child : &IWidget) -> Unit {
  moonbit_gtk_box_remove(self, child.as_widget())
}

///|
#borrow(self_, child, sibling)
extern "c" fn moonbit_gtk_box_reorder_child_after(
  self_ : Box,
  child : Widget,
  sibling : @glib.Nullable[Widget],
) = "moonbit_gtk_box_reorder_child_after"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.reorder_child_after.html).
pub fn Box::reorder_child_after(
  self : Box,
  child : &IWidget,
  sibling : &IWidget?,
) -> Unit {
  moonbit_gtk_box_reorder_child_after(
    self,
    child.as_widget(),
    match sibling {
      Some(v) => @glib.Nullable::some(v.as_widget())
      None => @glib.Nullable::null()
    },
  )
}

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.set_baseline_child.html).
#borrow(self)
pub extern "c" fn Box::set_baseline_child(self : Box, child : Int) = "moonbit_gtk_box_set_baseline_child"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.set_baseline_position.html).
#borrow(self)
pub extern "c" fn Box::set_baseline_position(
  self : Box,
  position : BaselinePosition,
) = "moonbit_gtk_box_set_baseline_position"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.set_homogeneous.html).
#borrow(self)
pub extern "c" fn Box::set_homogeneous(self : Box, homogeneous : Bool) = "moonbit_gtk_box_set_homogeneous"

///|
/// [Upstream documentation](https://docs.gtk.org/gtk4/method.Box.set_spacing.html).
#borrow(self)
pub extern "c" fn Box::set_spacing(self : Box, spacing : Int) = "moonbit_gtk_box_set_spacing"

///|
impl IBox with fn append(self, child) -> Unit {
  self.as_box().append(child)
}

///|
impl IBox with fn get_baseline_child(self) -> Int {
  self.as_box().get_baseline_child()
}

///|
impl IBox with fn get_baseline_position(self) -> BaselinePosition {
  self.as_box().get_baseline_position()
}

///|
impl IBox with fn get_homogeneous(self) -> Bool {
  self.as_box().get_homogeneous()
}

///|
impl IBox with fn get_spacing(self) -> Int {
  self.as_box().get_spacing()
}

///|
impl IBox with fn insert_child_after(self, child, sibling) -> Unit {
  self.as_box().insert_child_after(child, sibling)
}

///|
impl IBox with fn prepend(self, child) -> Unit {
  self.as_box().prepend(child)
}

///|
impl IBox with fn remove(self, child) -> Unit {
  self.as_box().remove(child)
}

///|
impl IBox with fn reorder_child_after(self, child, sibling) -> Unit {
  self.as_box().reorder_child_after(child, sibling)
}

///|
impl IBox with fn set_baseline_child(self, child) -> Unit {
  self.as_box().set_baseline_child(child)
}

///|
impl IBox with fn set_baseline_position(self, position) -> Unit {
  self.as_box().set_baseline_position(position)
}

///|
impl IBox with fn set_homogeneous(self, homogeneous) -> Unit {
  self.as_box().set_homogeneous(homogeneous)
}

///|
impl IBox with fn set_spacing(self, spacing) -> Unit {
  self.as_box().set_spacing(spacing)
}

///|
pub fn Box::as_widget(self : Box) -> Widget = "%identity"

///|
pub impl IWidget for Box with fn as_widget(self) {
  self.as_widget()
}

///|
pub fn Box::as_gobject_object(self : Box) -> @gobject.Object = "%identity"

///|
pub impl @gobject.IObject for Box with fn as_object(self) {
  self.as_gobject_object()
}

///|
pub fn Box::as_orientable(self : Box) -> Orientable = "%identity"

///|
pub impl IOrientable for Box with fn as_orientable(self) {
  self.as_orientable()
}