Module glerminal::terminal [] [src]

This module acts as the window and "canvas" of the terminal, handling most behind-the-sceneries

The Terminal is used to create the window and canvas for the TextBuffer which can then draw it, close the window, reset the title of the window or handle input.

Note when building with debug-mode, you are able to press F3 to toggle between debug and non-debug. see (Terminal) for more information.

Terminal example:

use glerminal::terminal::TerminalBuilder;

let terminal = TerminalBuilder::new()
    .with_title("Hello GLerminal!")
    .with_dimensions((1280, 720))
    .build();

let mut terminal vs let terminal

In most cases you might just want to initialize the terminal as immutable, but in some, you will need to initialize it as mutable, allowing it to run some additional methods, such as .show() and .set_title("title")

use glerminal::terminal::TerminalBuilder;

let mut terminal = TerminalBuilder::new()
    .with_title("Hello GLerminal!")
    .with_dimensions((1280, 720))
    .with_visibility(false)
    .build();

terminal.set_title("Changed title!");
terminal.show();

Structs

Terminal

Represents the Terminal itself.

TerminalBuilder

A builder for the Terminal. Includes some settings that can be set before building.