ze
Loading...
Searching...
No Matches
Files | Functions
Collaboration diagram for Rendering:

Files

file  render.c
 Terminal rendering of buffer contents and UI.
 

Functions

void editorScroll (void)
 Recompute scroll offsets to keep the cursor visible.
 
void editorDrawRows (struct abuf *ab)
 Render visible rows to the append buffer.
 
void editorDrawStatusBar (struct abuf *ab)
 Draw the status bar (filename, ft, position).
 
void editorDrawMessageBar (struct abuf *ab)
 Render the transient message bar.
 
void editorRefreshScreen (void)
 Update viewport offsets to keep the cursor visible.
 

Detailed Description

Function Documentation

◆ editorDrawMessageBar()

void editorDrawMessageBar ( struct abuf *  ab)

Render the transient message bar.

Clears the line and draws the current status message if set recently.

Parameters
[in,out]abAppend buffer to receive terminal bytes.

◆ editorDrawRows()

void editorDrawRows ( struct abuf *  ab)

Render visible rows to the append buffer.

Writes the visible portion of the buffer into ab using ANSI escapes and syntax highlighting. Control characters are inverted for visibility.

Parameters
[in,out]abAppend buffer to receive terminal bytes.
See also
editorDrawStatusBar(), editorDrawMessageBar(), editorRefreshScreen()

◆ editorDrawStatusBar()

void editorDrawStatusBar ( struct abuf *  ab)

Draw the status bar (filename, ft, position).

Shows filename, line count, modified flag, and right-aligned filetype and cursor position.

Parameters
[in,out]abAppend buffer to receive terminal bytes.
See also
editorDrawMessageBar()

◆ editorRefreshScreen()

void editorRefreshScreen ( void  )

Update viewport offsets to keep the cursor visible.

Scrolls the viewport, composes rows, status, and message bars into a dynamic buffer, restores the cursor position, and writes to STDOUT.

Postcondition
Terminal output is written; the append buffer is freed by abFree().
See also
editorScroll(), editorDrawRows(), abAppend(), abFree()

◆ editorScroll()

void editorScroll ( void  )

Recompute scroll offsets to keep the cursor visible.

Updates E.rowoff and E.coloff based on cursor location and render x coordinate (rx) so that the cursor remains within the viewport.

Postcondition
Viewport offsets may change.
See also
editorDrawRows(), editorRefreshScreen(), editorRowCxToRx()