use crate::{ffi,FoldThresholdPolicy,LapelFoldPolicy,LapelTransitionType,SpringParams,Swipeable};
use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
use std::{boxed::Box as Box_};
glib::wrapper! {
#[doc(alias = "BisLapel")]
pub struct Lapel(Object<ffi::BisLapel, ffi::BisLapelClass>) @extends gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, Swipeable, gtk::Orientable;
match fn {
type_ => || ffi::bis_lapel_get_type(),
}
}
impl Lapel {
#[doc(alias = "bis_lapel_new")]
pub fn new() -> Lapel {
assert_initialized_main_thread!();
unsafe {
gtk::Widget::from_glib_none(ffi::bis_lapel_new()).unsafe_cast()
}
}
pub fn builder() -> LapelBuilder {
LapelBuilder::new()
}
#[doc(alias = "bis_lapel_get_content")]
#[doc(alias = "get_content")]
pub fn content(&self) -> Option<gtk::Widget> {
unsafe {
from_glib_none(ffi::bis_lapel_get_content(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_fold_duration")]
#[doc(alias = "get_fold_duration")]
#[doc(alias = "fold-duration")]
pub fn fold_duration(&self) -> u32 {
unsafe {
ffi::bis_lapel_get_fold_duration(self.to_glib_none().0)
}
}
#[doc(alias = "bis_lapel_get_fold_policy")]
#[doc(alias = "get_fold_policy")]
#[doc(alias = "fold-policy")]
pub fn fold_policy(&self) -> LapelFoldPolicy {
unsafe {
from_glib(ffi::bis_lapel_get_fold_policy(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_fold_threshold_policy")]
#[doc(alias = "get_fold_threshold_policy")]
#[doc(alias = "fold-threshold-policy")]
pub fn fold_threshold_policy(&self) -> FoldThresholdPolicy {
unsafe {
from_glib(ffi::bis_lapel_get_fold_threshold_policy(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_folded")]
#[doc(alias = "get_folded")]
#[doc(alias = "folded")]
pub fn is_folded(&self) -> bool {
unsafe {
from_glib(ffi::bis_lapel_get_folded(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_lapel")]
#[doc(alias = "get_lapel")]
pub fn lapel(&self) -> Option<gtk::Widget> {
unsafe {
from_glib_none(ffi::bis_lapel_get_lapel(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_lapel_position")]
#[doc(alias = "get_lapel_position")]
#[doc(alias = "lapel-position")]
pub fn lapel_position(&self) -> gtk::PackType {
unsafe {
from_glib(ffi::bis_lapel_get_lapel_position(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_locked")]
#[doc(alias = "get_locked")]
#[doc(alias = "locked")]
pub fn is_locked(&self) -> bool {
unsafe {
from_glib(ffi::bis_lapel_get_locked(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_modal")]
#[doc(alias = "get_modal")]
#[doc(alias = "modal")]
pub fn is_modal(&self) -> bool {
unsafe {
from_glib(ffi::bis_lapel_get_modal(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_reveal_lapel")]
#[doc(alias = "get_reveal_lapel")]
#[doc(alias = "reveal-lapel")]
pub fn reveals_lapel(&self) -> bool {
unsafe {
from_glib(ffi::bis_lapel_get_reveal_lapel(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_reveal_params")]
#[doc(alias = "get_reveal_params")]
#[doc(alias = "reveal-params")]
pub fn reveal_params(&self) -> SpringParams {
unsafe {
from_glib_full(ffi::bis_lapel_get_reveal_params(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_reveal_progress")]
#[doc(alias = "get_reveal_progress")]
#[doc(alias = "reveal-progress")]
pub fn reveal_progress(&self) -> f64 {
unsafe {
ffi::bis_lapel_get_reveal_progress(self.to_glib_none().0)
}
}
#[doc(alias = "bis_lapel_get_separator")]
#[doc(alias = "get_separator")]
pub fn separator(&self) -> Option<gtk::Widget> {
unsafe {
from_glib_none(ffi::bis_lapel_get_separator(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_swipe_to_close")]
#[doc(alias = "get_swipe_to_close")]
#[doc(alias = "swipe-to-close")]
pub fn is_swipe_to_close(&self) -> bool {
unsafe {
from_glib(ffi::bis_lapel_get_swipe_to_close(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_swipe_to_open")]
#[doc(alias = "get_swipe_to_open")]
#[doc(alias = "swipe-to-open")]
pub fn is_swipe_to_open(&self) -> bool {
unsafe {
from_glib(ffi::bis_lapel_get_swipe_to_open(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_get_transition_type")]
#[doc(alias = "get_transition_type")]
#[doc(alias = "transition-type")]
pub fn transition_type(&self) -> LapelTransitionType {
unsafe {
from_glib(ffi::bis_lapel_get_transition_type(self.to_glib_none().0))
}
}
#[doc(alias = "bis_lapel_set_content")]
#[doc(alias = "content")]
pub fn set_content(&self, content: Option<&impl IsA<gtk::Widget>>) {
unsafe {
ffi::bis_lapel_set_content(self.to_glib_none().0, content.map(|p| p.as_ref()).to_glib_none().0);
}
}
#[doc(alias = "bis_lapel_set_fold_duration")]
#[doc(alias = "fold-duration")]
pub fn set_fold_duration(&self, duration: u32) {
unsafe {
ffi::bis_lapel_set_fold_duration(self.to_glib_none().0, duration);
}
}
#[doc(alias = "bis_lapel_set_fold_policy")]
#[doc(alias = "fold-policy")]
pub fn set_fold_policy(&self, policy: LapelFoldPolicy) {
unsafe {
ffi::bis_lapel_set_fold_policy(self.to_glib_none().0, policy.into_glib());
}
}
#[doc(alias = "bis_lapel_set_fold_threshold_policy")]
#[doc(alias = "fold-threshold-policy")]
pub fn set_fold_threshold_policy(&self, policy: FoldThresholdPolicy) {
unsafe {
ffi::bis_lapel_set_fold_threshold_policy(self.to_glib_none().0, policy.into_glib());
}
}
#[doc(alias = "bis_lapel_set_lapel")]
#[doc(alias = "lapel")]
pub fn set_lapel(&self, lapel: Option<&impl IsA<gtk::Widget>>) {
unsafe {
ffi::bis_lapel_set_lapel(self.to_glib_none().0, lapel.map(|p| p.as_ref()).to_glib_none().0);
}
}
#[doc(alias = "bis_lapel_set_lapel_position")]
#[doc(alias = "lapel-position")]
pub fn set_lapel_position(&self, position: gtk::PackType) {
unsafe {
ffi::bis_lapel_set_lapel_position(self.to_glib_none().0, position.into_glib());
}
}
#[doc(alias = "bis_lapel_set_locked")]
#[doc(alias = "locked")]
pub fn set_locked(&self, locked: bool) {
unsafe {
ffi::bis_lapel_set_locked(self.to_glib_none().0, locked.into_glib());
}
}
#[doc(alias = "bis_lapel_set_modal")]
#[doc(alias = "modal")]
pub fn set_modal(&self, modal: bool) {
unsafe {
ffi::bis_lapel_set_modal(self.to_glib_none().0, modal.into_glib());
}
}
#[doc(alias = "bis_lapel_set_reveal_lapel")]
#[doc(alias = "reveal-lapel")]
pub fn set_reveal_lapel(&self, reveal_lapel: bool) {
unsafe {
ffi::bis_lapel_set_reveal_lapel(self.to_glib_none().0, reveal_lapel.into_glib());
}
}
#[doc(alias = "bis_lapel_set_reveal_params")]
#[doc(alias = "reveal-params")]
pub fn set_reveal_params(&self, params: &SpringParams) {
unsafe {
ffi::bis_lapel_set_reveal_params(self.to_glib_none().0, params.to_glib_none().0);
}
}
#[doc(alias = "bis_lapel_set_separator")]
#[doc(alias = "separator")]
pub fn set_separator(&self, separator: Option<&impl IsA<gtk::Widget>>) {
unsafe {
ffi::bis_lapel_set_separator(self.to_glib_none().0, separator.map(|p| p.as_ref()).to_glib_none().0);
}
}
#[doc(alias = "bis_lapel_set_swipe_to_close")]
#[doc(alias = "swipe-to-close")]
pub fn set_swipe_to_close(&self, swipe_to_close: bool) {
unsafe {
ffi::bis_lapel_set_swipe_to_close(self.to_glib_none().0, swipe_to_close.into_glib());
}
}
#[doc(alias = "bis_lapel_set_swipe_to_open")]
#[doc(alias = "swipe-to-open")]
pub fn set_swipe_to_open(&self, swipe_to_open: bool) {
unsafe {
ffi::bis_lapel_set_swipe_to_open(self.to_glib_none().0, swipe_to_open.into_glib());
}
}
#[doc(alias = "bis_lapel_set_transition_type")]
#[doc(alias = "transition-type")]
pub fn set_transition_type(&self, transition_type: LapelTransitionType) {
unsafe {
ffi::bis_lapel_set_transition_type(self.to_glib_none().0, transition_type.into_glib());
}
}
#[doc(alias = "content")]
pub fn connect_content_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_content_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::content\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_content_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "fold-duration")]
pub fn connect_fold_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_fold_duration_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::fold-duration\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_fold_duration_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "fold-policy")]
pub fn connect_fold_policy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_fold_policy_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::fold-policy\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_fold_policy_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "fold-threshold-policy")]
pub fn connect_fold_threshold_policy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_fold_threshold_policy_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::fold-threshold-policy\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_fold_threshold_policy_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "folded")]
pub fn connect_folded_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_folded_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::folded\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_folded_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "lapel")]
pub fn connect_lapel_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_lapel_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::lapel\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_lapel_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "lapel-position")]
pub fn connect_lapel_position_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_lapel_position_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::lapel-position\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_lapel_position_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "locked")]
pub fn connect_locked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_locked_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::locked\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_locked_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "modal")]
pub fn connect_modal_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_modal_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::modal\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_modal_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "reveal-lapel")]
pub fn connect_reveal_lapel_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_reveal_lapel_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::reveal-lapel\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_reveal_lapel_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "reveal-params")]
pub fn connect_reveal_params_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_reveal_params_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::reveal-params\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_reveal_params_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "reveal-progress")]
pub fn connect_reveal_progress_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_reveal_progress_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::reveal-progress\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_reveal_progress_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "separator")]
pub fn connect_separator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_separator_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::separator\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_separator_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "swipe-to-close")]
pub fn connect_swipe_to_close_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_swipe_to_close_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::swipe-to-close\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_swipe_to_close_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "swipe-to-open")]
pub fn connect_swipe_to_open_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_swipe_to_open_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::swipe-to-open\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_swipe_to_open_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "transition-type")]
pub fn connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_transition_type_trampoline<F: Fn(&Lapel) + 'static>(this: *mut ffi::BisLapel, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::transition-type\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_transition_type_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
}
impl Default for Lapel {
fn default() -> Self {
Self::new()
}
}
#[must_use = "The builder must be built to be used"]
pub struct LapelBuilder {
builder: glib::object::ObjectBuilder<'static, Lapel>,
}
impl LapelBuilder {
fn new() -> Self {
Self { builder: glib::object::Object::builder() }
}
pub fn content(self, content: &impl IsA<gtk::Widget>) -> Self {
Self { builder: self.builder.property("content", content.clone().upcast()), }
}
pub fn fold_duration(self, fold_duration: u32) -> Self {
Self { builder: self.builder.property("fold-duration", fold_duration), }
}
pub fn fold_policy(self, fold_policy: LapelFoldPolicy) -> Self {
Self { builder: self.builder.property("fold-policy", fold_policy), }
}
pub fn fold_threshold_policy(self, fold_threshold_policy: FoldThresholdPolicy) -> Self {
Self { builder: self.builder.property("fold-threshold-policy", fold_threshold_policy), }
}
pub fn lapel(self, lapel: &impl IsA<gtk::Widget>) -> Self {
Self { builder: self.builder.property("lapel", lapel.clone().upcast()), }
}
pub fn lapel_position(self, lapel_position: gtk::PackType) -> Self {
Self { builder: self.builder.property("lapel-position", lapel_position), }
}
pub fn locked(self, locked: bool) -> Self {
Self { builder: self.builder.property("locked", locked), }
}
pub fn modal(self, modal: bool) -> Self {
Self { builder: self.builder.property("modal", modal), }
}
pub fn reveal_lapel(self, reveal_lapel: bool) -> Self {
Self { builder: self.builder.property("reveal-lapel", reveal_lapel), }
}
pub fn reveal_params(self, reveal_params: &SpringParams) -> Self {
Self { builder: self.builder.property("reveal-params", reveal_params.clone()), }
}
pub fn separator(self, separator: &impl IsA<gtk::Widget>) -> Self {
Self { builder: self.builder.property("separator", separator.clone().upcast()), }
}
pub fn swipe_to_close(self, swipe_to_close: bool) -> Self {
Self { builder: self.builder.property("swipe-to-close", swipe_to_close), }
}
pub fn swipe_to_open(self, swipe_to_open: bool) -> Self {
Self { builder: self.builder.property("swipe-to-open", swipe_to_open), }
}
pub fn transition_type(self, transition_type: LapelTransitionType) -> Self {
Self { builder: self.builder.property("transition-type", transition_type), }
}
pub fn can_focus(self, can_focus: bool) -> Self {
Self { builder: self.builder.property("can-focus", can_focus), }
}
pub fn can_target(self, can_target: bool) -> Self {
Self { builder: self.builder.property("can-target", can_target), }
}
pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
Self { builder: self.builder.property("css-classes", css_classes.into()), }
}
pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
Self { builder: self.builder.property("css-name", css_name.into()), }
}
pub fn focus_on_click(self, focus_on_click: bool) -> Self {
Self { builder: self.builder.property("focus-on-click", focus_on_click), }
}
pub fn focusable(self, focusable: bool) -> Self {
Self { builder: self.builder.property("focusable", focusable), }
}
pub fn has_tooltip(self, has_tooltip: bool) -> Self {
Self { builder: self.builder.property("has-tooltip", has_tooltip), }
}
pub fn height_request(self, height_request: i32) -> Self {
Self { builder: self.builder.property("height-request", height_request), }
}
pub fn hexpand(self, hexpand: bool) -> Self {
Self { builder: self.builder.property("hexpand", hexpand), }
}
pub fn hexpand_set(self, hexpand_set: bool) -> Self {
Self { builder: self.builder.property("hexpand-set", hexpand_set), }
}
pub fn layout_manager(self, layout_manager: &impl IsA<gtk::LayoutManager>) -> Self {
Self { builder: self.builder.property("layout-manager", layout_manager.clone().upcast()), }
}
pub fn margin_bottom(self, margin_bottom: i32) -> Self {
Self { builder: self.builder.property("margin-bottom", margin_bottom), }
}
pub fn margin_end(self, margin_end: i32) -> Self {
Self { builder: self.builder.property("margin-end", margin_end), }
}
pub fn margin_start(self, margin_start: i32) -> Self {
Self { builder: self.builder.property("margin-start", margin_start), }
}
pub fn margin_top(self, margin_top: i32) -> Self {
Self { builder: self.builder.property("margin-top", margin_top), }
}
pub fn name(self, name: impl Into<glib::GString>) -> Self {
Self { builder: self.builder.property("name", name.into()), }
}
pub fn opacity(self, opacity: f64) -> Self {
Self { builder: self.builder.property("opacity", opacity), }
}
pub fn receives_default(self, receives_default: bool) -> Self {
Self { builder: self.builder.property("receives-default", receives_default), }
}
pub fn sensitive(self, sensitive: bool) -> Self {
Self { builder: self.builder.property("sensitive", sensitive), }
}
pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
Self { builder: self.builder.property("tooltip-markup", tooltip_markup.into()), }
}
pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
Self { builder: self.builder.property("tooltip-text", tooltip_text.into()), }
}
pub fn vexpand(self, vexpand: bool) -> Self {
Self { builder: self.builder.property("vexpand", vexpand), }
}
pub fn vexpand_set(self, vexpand_set: bool) -> Self {
Self { builder: self.builder.property("vexpand-set", vexpand_set), }
}
pub fn visible(self, visible: bool) -> Self {
Self { builder: self.builder.property("visible", visible), }
}
pub fn width_request(self, width_request: i32) -> Self {
Self { builder: self.builder.property("width-request", width_request), }
}
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
pub fn build(self) -> Lapel {
self.builder.build() }
}