Aptivi - Manual
ProjectsWebsiteBlog
Terminaux - Manual
Terminaux - Manual
  • Welcome!
  • Breaking changes
    • API v1.0
    • API v2.0
    • API v3.0
    • API v4.0
    • API v5.0
    • API v6.0
    • API v7.0
  • Usage
    • Preface
    • Console Tools
      • Console Checker
        • Console Size Requirements
      • Image Rendering
        • Icons
      • Console Writers
        • Individual Writers
        • Cyclic Writers
          • Geometric Shapes
          • Charts
          • Text
          • Artistic
          • Progress Bars
          • Lists and Calendars
          • Miscellaneous
        • Informational Boxes
      • Textual UI
        • Interactive TUI
        • Console Screen
        • Console Resize Listener
        • VT Sequences
      • Console Wrapper
      • Console Colors
      • Color Templates
      • Presentation System
      • Console Extensions
      • Nerd Fonts
      • Terminal Info
      • Test Fixtures
      • Terminal Structures
      • Console Logging
    • Input Reader
      • Shells
        • Shell Structure
          • Help System
          • Command Parsing
          • Command Information
          • Command Switches
          • Shell Presets
          • Command Aliasing
      • Other Input
        • Keybindings
        • Choice-based inputs
        • Editors and Viewers
        • Figlet Font Selector
        • Color Wheel
        • Spinner Selector
      • Reader State
      • Reader Settings
      • Syntax Highlighting
      • Pointer Events
    • Color Sequences
      • Color Model Conversions
      • Color Model Parsing
      • Interop with System.Drawing.Color
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
  • Coordinates
  • Padding
  • Margin
Edit on GitHub
  1. Usage
  2. Console Tools

Terminal Structures

What do they represent?

Terminaux provides some useful structures that help you make console applications seamlessly and without repetition, such as coordinates, margins, and padding. They are found in the Terminaux.Base.Structures namespace, and they use structs to represent values as they are informational.

Coordinates

A structure that defines a coordinate relative to the console that starts with the upper left corner (0, 0) is called Coordinate. It contains two properties:

  • X: Specifies the left position as specified by the X axis of the console

  • Y: Specifies the top position as specified by the Y axis of the console

This allows you to store coordinate information in one variable without having to resort to tuples or multiple variables.

Padding

A structure that defines padding information related to the element, such as the console, is called Padding. The default padding is (0, 0, 0, 0) which represents the left, the top, the right, and the bottom padding. It contains the following properties:

  • Left: Left padding starting from 0

  • Top: Top padding starting from 0

  • Right: Right padding starting from 0

  • Bottom: Bottom padding starting from 0

This allows you to store padding information in one variable without having to resort to tuples or multiple variables.

Margin

A structure that defines the margin of an element is called Margin. It specifies the width and the height of the element, which makes this struct a measurement structure. It measures the margin values according to the padding values given. It contains the following properties:

  • Width: Processed width with margin padding applied

  • Height: Processed height with margin padding applied

This allows you to store margin information in one variable without having to resort to tuples or multiple variables.

Last updated 5 months ago