#[repr(C)]pub struct ncplane_options {
pub y: i32,
pub x: i32,
pub rows: u32,
pub cols: u32,
pub userptr: *mut c_void,
pub name: *const i8,
pub resizecb: Option<unsafe extern "C" fn(*mut ncplane) -> i32>,
pub flags: u64,
pub margin_b: u32,
pub margin_r: u32,
}Fields§
§y: i32vertical placement relative to parent plane
x: i32horizontal placement relative to parent plane
rows: u32rows, must be >0 unless NCPLANE_OPTION_MARGINALIZED
cols: u32columns, must be >0 unless NCPLANE_OPTION_MARGINALIZED
userptr: *mut c_voiduser curry, may be NULL
name: *const i8name (used only for debugging), may be NULL
resizecb: Option<unsafe extern "C" fn(*mut ncplane) -> i32>callback when parent is resized
flags: u64closure over NCPLANE_OPTION_*
margin_b: u32margins (require NCPLANE_OPTION_MARGINALIZED)
margin_r: u32margins (require NCPLANE_OPTION_MARGINALIZED)
Implementations§
Source§impl ncplane_options
§Constructors
impl ncplane_options
§Constructors
Sourcepub fn new(y: i32, x: i32, rows: u32, cols: u32) -> ncplane_options
pub fn new(y: i32, x: i32, rows: u32, cols: u32) -> ncplane_options
New NcPlaneOptions using the horizontal x.
Sourcepub fn builder() -> NcPlaneOptionsBuilder
pub fn builder() -> NcPlaneOptionsBuilder
Returns a default NcPlane options builder.
Sourcepub fn to_builder(&self) -> NcPlaneOptionsBuilder
pub fn to_builder(&self) -> NcPlaneOptionsBuilder
Returns a builder object from the current NcPlane options.
Sourcepub fn new_aligned(
y: i32,
align: impl Into<NcAlign>,
rows: u32,
cols: u32,
) -> ncplane_options
pub fn new_aligned( y: i32, align: impl Into<NcAlign>, rows: u32, cols: u32, ) -> ncplane_options
New NcPlaneOptions with horizontal alignment.
Sourcepub fn with_flags(
y: i32,
x: i32,
rows: u32,
cols: u32,
resizecb: Option<fn(&mut ncplane) -> i32>,
flags: impl Into<NcPlaneFlag>,
margin_b: u32,
margin_r: u32,
) -> ncplane_options
pub fn with_flags( y: i32, x: i32, rows: u32, cols: u32, resizecb: Option<fn(&mut ncplane) -> i32>, flags: impl Into<NcPlaneFlag>, margin_b: u32, margin_r: u32, ) -> ncplane_options
New NcPlaneOptions, with flags.
Sourcepub fn with_flags_aligned(
y: i32,
align: impl Into<NcAlign>,
rows: u32,
cols: u32,
resizecb: Option<fn(&mut ncplane) -> i32>,
flags: impl Into<NcPlaneFlag>,
) -> ncplane_options
pub fn with_flags_aligned( y: i32, align: impl Into<NcAlign>, rows: u32, cols: u32, resizecb: Option<fn(&mut ncplane) -> i32>, flags: impl Into<NcPlaneFlag>, ) -> ncplane_options
New NcPlaneOptions, with flags and horizontal alignment.
Note: Already includes the
NcPlaneOptions::HORALIGNED
flag.
Source§impl ncplane_options
§Methods
impl ncplane_options
§Methods
Sourcepub fn is_veraligned(&self) -> bool
pub fn is_veraligned(&self) -> bool
Returns true if it has the VerAligned flag set.
Sourcepub fn is_horaligned(&self) -> bool
pub fn is_horaligned(&self) -> bool
Returns true if it has the HorAligned flag set.
Sourcepub fn is_marginalized(&self) -> bool
pub fn is_marginalized(&self) -> bool
Returns true if it has the Marginalized flag set.
Sourcepub fn is_autogrow(&self) -> bool
pub fn is_autogrow(&self) -> bool
Returns true if it has the AutoGrow flag set.
Sourcepub fn is_vscroll(&self) -> bool
pub fn is_vscroll(&self) -> bool
Returns true if it has the VScroll flag set.