Struct libnotcurses_sys::NcOptionsBuilder
source · pub struct NcOptionsBuilder { /* private fields */ }
Expand description
Builder object for NcOptions
.
Implementations§
source§impl NcOptionsBuilder
impl NcOptionsBuilder
sourcepub fn log_level(self, log_level: NcLogLevel) -> Self
pub fn log_level(self, log_level: NcLogLevel) -> Self
Sets the log level.
sourcepub fn margin_top(self, top: u32) -> Self
pub fn margin_top(self, top: u32) -> Self
Sets the top margin.
sourcepub fn margin_right(self, right: u32) -> Self
pub fn margin_right(self, right: u32) -> Self
Sets the right margin.
sourcepub fn margin_bottom(self, bottom: u32) -> Self
pub fn margin_bottom(self, bottom: u32) -> Self
Sets the bottom margin.
sourcepub fn margin_left(self, left: u32) -> Self
pub fn margin_left(self, left: u32) -> Self
Sets the left margin.
sourcepub fn drain_input(self, drain: bool) -> Self
pub fn drain_input(self, drain: bool) -> Self
If true
, Input may be freely dropped.
This ought be provided when the program does not intend to handle input. Otherwise, input can accumulate in internal buffers, eventually preventing Notcurses from processing terminal messages.
See NcFlag::
DrainInput
.
sourcepub fn inhibit_set_locale(self, inhibit: bool) -> Self
pub fn inhibit_set_locale(self, inhibit: bool) -> Self
If true
, wont call setlocale().
See NcFlag::
InhibitSetLocale
.
sourcepub fn no_alternate_screen(self, no_alternate: bool) -> Self
pub fn no_alternate_screen(self, no_alternate: bool) -> Self
If true
, wont enter alternate mode.
See NcFlag::
NoAlternateScreen
.
sourcepub fn no_clear_bitmaps(self, no_clear: bool) -> Self
pub fn no_clear_bitmaps(self, no_clear: bool) -> Self
If true
, wont try to clear any preexisting bitmaps.
See NcFlag::
NoClearBitmaps
.
sourcepub fn no_font_changes(self, no_font_changes: bool) -> Self
pub fn no_font_changes(self, no_font_changes: bool) -> Self
If true
, wont modify the font.
See NcFlag::
NoFontChanges
.
sourcepub fn no_quit_sig_handlers(self, no_quit: bool) -> Self
pub fn no_quit_sig_handlers(self, no_quit: bool) -> Self
If true
, wont handle SIGINT
, SIGSEGV
, SIGABRT
nor SIGQUIT
.
See NcFlag::
NoQuitSigHandlers
.
sourcepub fn no_winch_sig_handler(self, no_winch: bool) -> Self
pub fn no_winch_sig_handler(self, no_winch: bool) -> Self
If true
, wont handle SIGWINCH
.
See NcFlag::
NoWinchSigHandler
.
sourcepub fn preserve_cursor(self, preserve: bool) -> Self
pub fn preserve_cursor(self, preserve: bool) -> Self
If true
, will initializes the CLI plane’s virtual cursor to match
the physical cursor at context creation time.
See NcFlag::
PreserveCursor
.
sourcepub fn scrolling(self, scrolling: bool) -> Self
pub fn scrolling(self, scrolling: bool) -> Self
If true
, will prepare the CLI plane in scrolling mode.
See NcFlag::
Scrolling
.
sourcepub fn cli_mode(self, cli_mode: bool) -> Self
pub fn cli_mode(self, cli_mode: bool) -> Self
A shortcut for setting the following options together:
no_alternate_screen
, no_clear_bitmaps
, preserve_cursor
& scrolling
.
See NcFlag::
CliMode
.
If true
, wont print banners.
See NcFlag::
SuppressBanners
.
source§impl NcOptionsBuilder
impl NcOptionsBuilder
sourcepub fn set_log_level(&mut self, log_level: NcLogLevel)
pub fn set_log_level(&mut self, log_level: NcLogLevel)
Sets the log level.
sourcepub fn set_margin_top(&mut self, top: u32)
pub fn set_margin_top(&mut self, top: u32)
Sets the top margin.
sourcepub fn set_margin_right(&mut self, right: u32)
pub fn set_margin_right(&mut self, right: u32)
Sets the right margin.
sourcepub fn set_margin_bottom(&mut self, bottom: u32)
pub fn set_margin_bottom(&mut self, bottom: u32)
Sets the bottom margin.
sourcepub fn set_margin_left(&mut self, left: u32)
pub fn set_margin_left(&mut self, left: u32)
Sets the left margin.
sourcepub fn set_drain_input(&mut self, drain: bool)
pub fn set_drain_input(&mut self, drain: bool)
If true
, Input may be freely dropped.
This ought be provided when the program does not intend to handle input. Otherwise, input can accumulate in internal buffers, eventually preventing Notcurses from processing terminal messages.
See NcFlag::
DrainInput
.
sourcepub fn set_inhibit_set_locale(&mut self, inhibit: bool)
pub fn set_inhibit_set_locale(&mut self, inhibit: bool)
If true
, wont call setlocale().
See NcFlag::
InhibitSetLocale
.
sourcepub fn set_no_alternate_screen(&mut self, no_alternate: bool)
pub fn set_no_alternate_screen(&mut self, no_alternate: bool)
If true
, wont enter alternate mode.
See NcFlag::
NoAlternateScreen
.
sourcepub fn set_no_clear_bitmaps(&mut self, no_clear: bool)
pub fn set_no_clear_bitmaps(&mut self, no_clear: bool)
If true
, wont try to clear any preexisting bitmaps.
See NcFlag::
NoClearBitmaps
.
sourcepub fn set_no_font_changes(&mut self, no_font_changes: bool)
pub fn set_no_font_changes(&mut self, no_font_changes: bool)
If true
, wont modify the font.
See NcFlag::
NoFontChanges
.
sourcepub fn set_no_quit_sig_handlers(&mut self, no_quit: bool)
pub fn set_no_quit_sig_handlers(&mut self, no_quit: bool)
If true
, wont handle SIGINT
, SIGSEGV
, SIGABRT
nor SIGQUIT
.
See NcFlag::
NoQuitSigHandlers
.
sourcepub fn set_no_winch_sig_handler(&mut self, no_winch: bool)
pub fn set_no_winch_sig_handler(&mut self, no_winch: bool)
If true
, wont handle SIGWINCH
.
See NcFlag::
NoWinchSigHandler
.
sourcepub fn set_preserve_cursor(&mut self, preserve: bool)
pub fn set_preserve_cursor(&mut self, preserve: bool)
If true
, will initializes the CLI plane’s virtual cursor to match
the physical cursor at context creation time.
See NcFlag::
PreserveCursor
.
sourcepub fn set_scrolling(&mut self, scrolling: bool)
pub fn set_scrolling(&mut self, scrolling: bool)
If true
, will prepare the CLI plane in scrolling mode.
See NcFlag::
Scrolling
.
sourcepub fn set_cli_mode(&mut self, cli_mode: bool)
pub fn set_cli_mode(&mut self, cli_mode: bool)
A shortcut for setting the following options together:
no_alternate_screen
, no_clear_bitmaps
, preserve_cursor
& scrolling
.
See NcFlag::
CliMode
.
If true
, wont print banners.
See NcFlag::
SuppressBanners
.
source§impl NcOptionsBuilder
impl NcOptionsBuilder
sourcepub fn get_margins(&self) -> (u32, u32, u32, u32)
pub fn get_margins(&self) -> (u32, u32, u32, u32)
Returns the (top, right, bottom, left)
margins.
sourcepub fn get_log_level(&self) -> NcLogLevel
pub fn get_log_level(&self) -> NcLogLevel
Returns the log level.
sourcepub fn is_drain_input(&self) -> bool
pub fn is_drain_input(&self) -> bool
Returns true
if it has the DrainInput
flag set.
sourcepub fn is_inhibit_set_locale(&self) -> bool
pub fn is_inhibit_set_locale(&self) -> bool
Returns true
if it has the InhibitSetLocale
flag set.
sourcepub fn is_no_alternate_screen(&self) -> bool
pub fn is_no_alternate_screen(&self) -> bool
Returns true
if it has the NoAlternateScreen
flag set.
sourcepub fn is_no_clear_bitmaps(&self) -> bool
pub fn is_no_clear_bitmaps(&self) -> bool
Returns true
if it has the NoClearBitmaps
flag set.
sourcepub fn is_no_font_changes(&self) -> bool
pub fn is_no_font_changes(&self) -> bool
Returns true
if it has the NoFontChanges
flag set.
sourcepub fn is_no_quit_sig_handlers(&self) -> bool
pub fn is_no_quit_sig_handlers(&self) -> bool
Returns true
if it has the NoQuitSigHandlers
flag set.
sourcepub fn is_no_winch_sig_handler(&self) -> bool
pub fn is_no_winch_sig_handler(&self) -> bool
Returns true
if it has the NoWinchSigHandler
flag set.
sourcepub fn is_preserve_cursor(&self) -> bool
pub fn is_preserve_cursor(&self) -> bool
Returns true
if it has the PreserveCursor
flag set.
sourcepub fn is_scrolling(&self) -> bool
pub fn is_scrolling(&self) -> bool
Returns true
if it has the Scrolling
flag set.
sourcepub fn is_cli_mode(&self) -> bool
pub fn is_cli_mode(&self) -> bool
Returns true
if it has the CliMode
flag set.
Returns true
if it has the SuppressBanners
flag set.
Trait Implementations§
source§impl Clone for NcOptionsBuilder
impl Clone for NcOptionsBuilder
source§fn clone(&self) -> NcOptionsBuilder
fn clone(&self) -> NcOptionsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more