Struct libnotcurses_sys::c_api::ncplane_options
source · [−]#[repr(C)]pub struct ncplane_options {
pub y: c_int,
pub x: c_int,
pub rows: c_uint,
pub cols: c_uint,
pub userptr: *mut c_void,
pub name: *const c_char,
pub resizecb: Option<unsafe extern "C" fn(arg1: *mut ncplane) -> c_int>,
pub flags: u64,
pub margin_b: c_uint,
pub margin_r: c_uint,
}Fields
y: c_intvertical placement relative to parent plane
x: c_inthorizontal placement relative to parent plane
rows: c_uintrows, must be >0 unless NCPLANE_OPTION_MARGINALIZED
cols: c_uintcolumns, must be >0 unless NCPLANE_OPTION_MARGINALIZED
userptr: *mut c_voiduser curry, may be NULL
name: *const c_charname (used only for debugging), may be NULL
resizecb: Option<unsafe extern "C" fn(arg1: *mut ncplane) -> c_int>callback when parent is resized
flags: u64closure over NCPLANE_OPTION_*
margin_b: c_uintmargins (require NCPLANE_OPTION_MARGINALIZED)
margin_r: c_uintmargins (require NCPLANE_OPTION_MARGINALIZED)
Implementations
sourceimpl ncplane_options
impl ncplane_options
sourcepub fn new(y: i32, x: i32, rows: u32, cols: u32) -> Self
pub fn new(y: i32, x: i32, rows: u32, cols: u32) -> Self
New NcPlaneOptions using the horizontal x.
sourcepub fn builder() -> NcPlaneOptionsBuilder
pub fn builder() -> NcPlaneOptionsBuilder
Returns a default builder object for NcPlaneOptions.
sourcepub fn to_builder(&self) -> NcPlaneOptionsBuilder
pub fn to_builder(&self) -> NcPlaneOptionsBuilder
Returns a builder object for NcPlaneOptions from the current options.
sourcepub fn new_aligned(
y: i32,
align: impl Into<NcAlign>,
rows: u32,
cols: u32
) -> Self
pub fn new_aligned(
y: i32,
align: impl Into<NcAlign>,
rows: u32,
cols: u32
) -> Self
New NcPlaneOptions with horizontal alignment.
sourcepub fn with_flags(
y: i32,
x: i32,
rows: u32,
cols: u32,
resizecb: Option<NcResizeCb>,
flags: impl Into<NcPlaneFlag>,
margin_b: u32,
margin_r: u32
) -> Self
pub fn with_flags(
y: i32,
x: i32,
rows: u32,
cols: u32,
resizecb: Option<NcResizeCb>,
flags: impl Into<NcPlaneFlag>,
margin_b: u32,
margin_r: u32
) -> Self
New NcPlaneOptions, with flags.
sourcepub fn with_flags_aligned(
y: i32,
align: impl Into<NcAlign>,
rows: u32,
cols: u32,
resizecb: Option<NcResizeCb>,
flags: impl Into<NcPlaneFlag>
) -> Self
pub fn with_flags_aligned(
y: i32,
align: impl Into<NcAlign>,
rows: u32,
cols: u32,
resizecb: Option<NcResizeCb>,
flags: impl Into<NcPlaneFlag>
) -> Self
New NcPlaneOptions, with flags and horizontal alignment.
Note: Already includes the
NcPlaneOptions::HORALIGNED
flag.
sourceimpl ncplane_options
impl ncplane_options
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.
Trait Implementations
sourceimpl Debug for ncplane_options
impl Debug for ncplane_options
sourceimpl Default for ncplane_options
impl Default for ncplane_options
sourceimpl From<&'_ mut ncplane_options> for NcPlaneOptionsBuilder
impl From<&'_ mut ncplane_options> for NcPlaneOptionsBuilder
sourcefn from(options: &mut NcPlaneOptions) -> Self
fn from(options: &mut NcPlaneOptions) -> Self
Converts to this type from the input type.
sourceimpl From<&'_ ncplane_options> for NcPlaneOptionsBuilder
impl From<&'_ ncplane_options> for NcPlaneOptionsBuilder
sourcefn from(options: &NcPlaneOptions) -> Self
fn from(options: &NcPlaneOptions) -> Self
Converts to this type from the input type.
sourceimpl From<ncplane_options> for NcPlaneOptionsBuilder
impl From<ncplane_options> for NcPlaneOptionsBuilder
sourcefn from(options: NcPlaneOptions) -> NcPlaneOptionsBuilder
fn from(options: NcPlaneOptions) -> NcPlaneOptionsBuilder
Converts to this type from the input type.
sourceimpl Hash for ncplane_options
impl Hash for ncplane_options
sourceimpl Ord for ncplane_options
impl Ord for ncplane_options
sourceimpl PartialEq<ncplane_options> for ncplane_options
impl PartialEq<ncplane_options> for ncplane_options
sourcefn eq(&self, other: &ncplane_options) -> bool
fn eq(&self, other: &ncplane_options) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ncplane_options) -> bool
fn ne(&self, other: &ncplane_options) -> bool
This method tests for !=.
sourceimpl PartialOrd<ncplane_options> for ncplane_options
impl PartialOrd<ncplane_options> for ncplane_options
sourcefn partial_cmp(&self, other: &ncplane_options) -> Option<Ordering>
fn partial_cmp(&self, other: &ncplane_options) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for ncplane_options
impl StructuralEq for ncplane_options
impl StructuralPartialEq for ncplane_options
Auto Trait Implementations
impl RefUnwindSafe for ncplane_options
impl !Send for ncplane_options
impl !Sync for ncplane_options
impl Unpin for ncplane_options
impl UnwindSafe for ncplane_options
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more