• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Eingebettete Systemsoftware
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssystemtechnik
    • Vorlesung
      • Folien
      • Glossar
    • Übung
      • Aufgaben
      • Dokumentation
        • Blog
          • Entwicklungsumgebung
            • Assembler Crashkurs
              • C++ Crashkurs
                • 🔗 Testrechnerverwaltung
                • 🔗 Adora-Belle (Helpdesk)
                • Kontakt
              • Evaluation

              Dokumentation

              Public Member Functions | Protected Attributes | List of all members
              TextWindow Class Reference

              Virtual windows in text mode. More...

              #include <machine/textwindow.h>

              + Inheritance diagram for TextWindow:
              [legend]
              + Collaboration diagram for TextWindow:
              [legend]

              Public Member Functions

               TextWindow (unsigned from_col, unsigned to_col, unsigned from_row, unsigned to_row, bool use_cursor=false)
               Constructor of a text window. More...
               
              void setPos (unsigned rel_x, unsigned rel_y)
               Set the cursor position in the window. More...
               
              void setPos (int rel_x, int rel_y)
               Set the cursor position in the window. More...
               
              void getPos (unsigned &rel_x, unsigned &rel_y) const
               Get the current cursor position in the window. More...
               
              void getPos (int &rel_x, int &rel_y) const
               Get the current cursor position in the window. More...
               
              void print (const char *string, size_t length, Attribute attrib=TextMode::Attribute())
               Display multiple characters in the window. More...
               
              void reset (char character=' ', Attribute attrib=TextMode::Attribute())
               Delete all contents in the window and reset the cursor. More...
               

              Protected Attributes

              unsigned from_col
               Start column position (inclusive) of window.
               
              unsigned to_col
               End column position (exclusive) of window.
               
              unsigned from_row
               Start row position (inclusive) of window.
               
              unsigned to_row
               End row position (exclusive) of window.
               
              bool use_cursor
               use hardware cursor More...
               
              unsigned pos_x
               Software cursor column.
               
              unsigned pos_y
               Software cursor row.
               

              Additional Inherited Members

              - Public Types inherited from TextMode
              enum  Color {
                BLACK,
                BLUE,
                GREEN,
                CYAN,
                RED,
                MAGENTA,
                BROWN,
                LIGHT_GREY,
                DARK_GREY,
                LIGHT_BLUE,
                LIGHT_GREEN,
                LIGHT_CYAN,
                LIGHT_RED,
                LIGHT_MAGENTA,
                YELLOW,
                WHITE
              }
               CGA color palette. More...
               
              - Static Public Member Functions inherited from TextMode
              static void setCursor (unsigned abs_x, unsigned abs_y)
               Set the keyboard hardware cursor to absolute screen position. More...
               
              static void getCursor (unsigned &abs_x, unsigned &abs_y)
               Retrieve the keyboard hardware cursor position on screen. More...
               
              static void show (unsigned abs_x, unsigned abs_y, char character, Attribute attrib=Attribute())
               Basic output of a character at a specific position on the screen. More...
               
              static void show (int abs_x, int abs_y, char character, Attribute attrib=Attribute())
               Basic output of a character at a specific position on the screen. More...
               
              static void showMouse (unsigned abs_x, unsigned abs_y)
               Show the mouse cursor by switching foreground and background of the cell at cursor position. More...
               
              - Static Public Attributes inherited from TextMode
              static const unsigned ROWS = 25
               Visible rows in text mode.
               
              static const unsigned COLUMNS = 80
               Visible columns in text mode.
               
              - Protected Member Functions inherited from TextMode
               TextMode ()
               Default constructor.
               
              - Static Protected Attributes inherited from TextMode
              static Cell *const TEXT_BUFFER_BASE = reinterpret_cast<TextMode::Cell *>(0xb8000)
               Base address for linear text buffer in video memory.
               
              static unsigned mouse_x = 0
               Last reported column of mouse cursor.
               
              static unsigned mouse_y = 0
               Last reported row of mouse cursor.
               
              static Attribute mouse_attrib
               (Previous) attributes of cell at mouse cursor
               

              Detailed Description

              Virtual windows in text mode.

              Outputs text on a part of the screen in text mode, a window defined in its position and size (with its own cursor).

              This allows to separate the output of the application from the debug output on the screen without having to synchronize.

              Constructor & Destructor Documentation

              TextWindow::TextWindow ( unsigned  from_col,
              unsigned  to_col,
              unsigned  from_row,
              unsigned  to_row,
              bool  use_cursor = false 
              )

              Constructor of a text window.

              Creates a virtual, rectangular text window on the screen. The coordinates to construct the window are absolute positions in the TextMode screen.

              Note
              Overlapping windows are neither supported nor prevented – better just try to avoid construction windows with overlapping coordinates!
              Warning
              Don't use the hardware cursor in more than one window!
              Parameters
              from_colText Window starts in column from_col, the first (leftmost) possible column is 0
              to_colText Window extends to the right to column to_col (exclusive). This column has to be strictly greater than from_col, the maximum allowed value is TextMode::COLUMNS (rightmost)
              from_rowText Window starts in row from_row, the first possible (uppermost) row is 0
              to_rowText Window extends down to row to_row (exclusive). This row has to be strictly greater than from_row, the maximum allowed value is TextMode::ROWS (bottom-most)
              use_cursorSpecifies whether the hardware cursor (true) or a software cursor/variable (false) should be used to store the current position

              Member Function Documentation

              void TextWindow::setPos ( unsigned  rel_x,
              unsigned  rel_y 
              )

              Set the cursor position in the window.

              Depending on the constructor parameter use_cursor either the hardware cursor (and only the hardware cursor!) is used or the position is stored internally in the object.

              The coordinates are relative to the upper left starting position of the window.

              Parameters
              rel_xColumn in window
              rel_yRow in window
              void TextWindow::setPos ( int  rel_x,
              int  rel_y 
              )

              Set the cursor position in the window.

              Depending on the constructor parameter use_cursor either the hardware cursor (and only the hardware cursor!) is used or the position is stored internally in the object.

              The coordinates are relative to the upper left starting position of the window. Negative coordinates are interpreted relative to the right and bottom border of the window.

              void TextWindow::getPos ( unsigned &  rel_x,
              unsigned &  rel_y 
              ) const

              Get the current cursor position in the window.

              Depending on the constructor parameter use_cursor either the hardware cursor (and only the hardware cursor!) is used or the position is retrieved from the internally stored object.

              Parameters
              rel_xColumn in window
              rel_yRow in window
              void TextWindow::getPos ( int &  rel_x,
              int &  rel_y 
              ) const

              Get the current cursor position in the window.

              Depending on the constructor parameter use_cursor either the hardware cursor (and only the hardware cursor!) is used or the position is retrieved from the internally stored object.

              Parameters
              rel_xColumn in window
              rel_yRow in window
              void TextWindow::print ( const char *  string,
              size_t  length,
              Attribute  attrib = TextMode::Attribute() 
              )

              Display multiple characters in the window.

              Output a character string, starting at the current cursor position. Since the string does not need to contain a \0 termination (unlike the common C string), a length parameter is required to specify the number of characters in the string. When the output is complete, the cursor is positioned after the last printed character. The same attributes (colors) are used for the entire text.

              If there is not enough space left at the end of the line, the output continues on the following line. As soon as the last window line is filled, the entire window area is moved up one line: The first line disappears, the bottom line is cleared.

              A line break also occurs whenever the character \n appears in the text.

              Parameters
              stringText to be printed
              lengthLength of text
              attribAttribute for text
              void TextWindow::reset ( char  character = ' ',
              Attribute  attrib = TextMode::Attribute() 
              )

              Delete all contents in the window and reset the cursor.

              Parameters
              characterFill character
              attribAttribute for fill character

              Member Data Documentation

              bool TextWindow::use_cursor
              protected

              use hardware cursor

              otherwise the position is stored in local variables


              The documentation for this class was generated from the following files:
              • machine/textwindow.h
              • machine/textwindow.cc
              Friedrich-Alexander-Universität
              Erlangen-Nürnberg

              Schlossplatz 4
              91054 Erlangen
              • Impressum
              • Datenschutz
              • Barrierefreiheit
              • Facebook
              • RSS Feed
              • Xing
              Nach oben