NcPlaneOptions

Type Alias NcPlaneOptions 

Source
pub type NcPlaneOptions = ncplane_options;
Expand description

Options struct for NcPlane.

It is recommended to construct it via NcPlaneOptionsBuilder by calling NcPlaneOptions::builder().

§Fields

  • y: vertical placement relative to parent plane.
  • x: horizontal placement relative to parent plane.
  • rows: vertical length in rows.
  • cols: horizontal length in columns.
  • userptr: optional user curry.
  • name: optional string identifier for debugging.
  • resizecb: callback when parent is resized.
  • margin_b: bottom margin (requires the Marginalized flag).
  • margin_r: right margin (requires the Marginalized).

Aliased Type§

#[repr(C)]
pub struct NcPlaneOptions { 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: i32

vertical placement relative to parent plane

§x: i32

horizontal placement relative to parent plane

§rows: u32

rows, must be >0 unless NCPLANE_OPTION_MARGINALIZED

§cols: u32

columns, must be >0 unless NCPLANE_OPTION_MARGINALIZED

§userptr: *mut c_void

user curry, may be NULL

§name: *const i8

name (used only for debugging), may be NULL

§resizecb: Option<unsafe extern "C" fn(*mut ncplane) -> i32>

callback when parent is resized

§flags: u64

closure over NCPLANE_OPTION_*

§margin_b: u32

margins (require NCPLANE_OPTION_MARGINALIZED)

§margin_r: u32

margins (require NCPLANE_OPTION_MARGINALIZED)