pub struct TerminalBuilder {
pub title: String,
pub dimensions: (u32, u32),
pub clear_color: (f32, f32, f32, f32),
pub font: Font,
pub visibility: bool,
pub headless: bool,
pub text_buffer_aspect_ratio: bool,
pub vsync: bool,
}
A builder for the Terminal
. Includes some settings that can be set before building.
See terminal mod for examples and more detailed documentation.
Title of the Terminal
window
The dimensions the window will open at
The clear color of the terminal.
The font that the terminal uses
Is the terminal visible/does it open when builded. It can be later opened/shown with show
Is the terminal headless, meaning there is no visual display for the terminal. Used for testing.
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.
Creates a new terminal builder with default settings.
Sets the title for the Terminal
.
Sets the dimensions the Terminal
is to be opened with.
Sets the clear color of the terminal.
Changes the font that the terminal uses.
Changes the visibility that the terminal will be opened with. If headless, visibility will not matter.
Changes the visibility that the terminal will be opened with
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.
Enable/Disable vsync. Enabled by default.
Builds the actual terminal and opens the window
Returns the "default value" for a type. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<T> Downcast for T where T: Any, | |
Convert Box<Trait>
(where Trait: Downcast
) to Box<Any>
. Box<Any>
can then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot generate &Any
's vtable from &Trait
's. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot generate &mut Any
's vtable from &mut Trait
's. Read more