The container package is used to establish and mutate the layout of the terminal. An instance of the container object is required to start the Termdash application, see the Termdash API for details.
The container splits the raw terminal into smaller portions (sub-containers). The developer decides how the splits are organized. Design of the container object is heavily inspired by the i3 window manager, specifically by how the i3 wm organizes the layout of application windows on the screen.
Developers can also use the container to customize the look of the Termdash application.
Apart from organising the terminal layout, the Termdash infrastructure uses the container to call the Draw method on all placed widgets and to map virtual canvases given to widgets onto the raw terminal. The container is also responsible for distributing events to individual widgets.
Developers have two options when it comes to building the terminal layout.
- Use the container package directly to create layouts organized as a Binary tree layout.
- Use the grid package to create layouts organized into a Grid layout.
The created layout can be further customized by any of the following:
- Defining margin or padding, see Margin and padding.
- Dynamically changing the layout by updating the individual containers, see Dynamic layout.
Help
API Documentation
Terminal layer
Infrastructure layer
Container layer
Widgets layer
Tips and tricks
See a typo, something missing or outright wrong? Feel free to edit the Wiki pages directly, alternatively talk to us.