[−][src]Struct glerminal::TerminalBuilder
A builder for the Terminal
. Includes some settings that can be set before building.
See terminal mod for examples and more detailed documentation.
Fields
title: String
Title of the Terminal
window
dimensions: (u32, u32)
The dimensions the window will open at
clear_color: (f32, f32, f32, f32)
The clear color of the terminal.
font: Font
The font that the terminal uses
visibility: bool
Is the terminal visible/does it open when builded. It can be later opened/shown with show
headless: bool
Is the terminal headless, meaning there is no visual display for the terminal. Used for testing.
text_buffer_aspect_ratio: bool
Whether the aspect ratio should be retrieved from TextBuffer instead of the original resolution of the screen.
If set to false, the aspect ratio used to make black bars for the screen will be fetched from the original resolution of the screen; This will cause the fonts to strech a bit though.
If set to true (default), the aspect ratio will be fetched from the TextBuffer, causing almost any resolution to have black bars to make up for the missing spaces.
vsync: bool
Enable/Disable Vsync
Methods
impl TerminalBuilder
[src]
impl TerminalBuilder
pub fn new() -> TerminalBuilder | [src] |
Creates a new terminal builder with default settings.
pub fn with_title<T: Into<String>>(self, title: T) -> TerminalBuilder | [src] |
Sets the title for the Terminal
.
pub fn with_dimensions(self, dimensions: (u32, u32)) -> TerminalBuilder | [src] |
Sets the dimensions the Terminal
is to be opened with.
pub fn with_clear_color( | [src] |
Sets the clear color of the terminal.
pub fn with_font(self, font: Font) -> TerminalBuilder | [src] |
Changes the font that the terminal uses.
pub fn with_visibility(self, visibility: bool) -> TerminalBuilder | [src] |
Changes the visibility that the terminal will be opened with. If headless, visibility will not matter.
pub fn with_headless(self, headless: bool) -> TerminalBuilder | [src] |
Changes the visibility that the terminal will be opened with
pub fn with_text_buffer_aspect_ratio(self, tbar: bool) -> TerminalBuilder | [src] |
Changes whether the aspect ratio should be retrieved from TextBuffer instead of the original resolution of the screen.
If set to false, the aspect ratio used to make black bars for the screen will be fetched from the original resolution of the screen; This will cause the fonts to strech a bit though.
If set to true (default), the aspect ratio will be fetched from the TextBuffer, causing almost any resolution to have black bars to make up for the missing spaces.
pub fn with_vsync(self, vsync: bool) -> TerminalBuilder | [src] |
Enable/Disable vsync. Enabled by default.
pub fn build(self) -> Terminal | [src] |
Builds the actual terminal and opens the window
Trait Implementations
impl Default for TerminalBuilder
[src]
impl Default for TerminalBuilder
fn default() -> TerminalBuilder | [src] |
Auto Trait Implementations
impl Send for TerminalBuilder
impl Send for TerminalBuilder
impl Sync for TerminalBuilder
impl Sync for TerminalBuilder
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |