The Pedigree Project  0.1
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Xterm Class Reference
+ Collaboration diagram for Xterm:

Classes

class  Window
 
struct  XtermCmd
 Set of parameters for the XTerm commands. More...
 
struct  XtermOsControl
 

Public Member Functions

 Xterm (PedigreeGraphics::Framebuffer *pFramebuffer, size_t nWidth, size_t nHeight, size_t offsetLeft, size_t offsetTop, class Terminal *pT, class Widget *pWidget, Tui *pTui, class Font *pNormalFont, class Font *pBoldFont)
 
void write (uint32_t utf32, DirtyRectangle &rect)
 
void renderAll (DirtyRectangle &rect)
 
size_t getRows () const
 
size_t getCols () const
 
size_t getStride () const
 
void showCursor (DirtyRectangle &rect)
 
void hideCursor (DirtyRectangle &rect)
 
size_t getModes () const
 
void resize (size_t w, size_t h, PedigreeGraphics::Framebuffer *pFb)
 
void setCursorStyle (bool bFilled)
 
void processKey (uint64_t key)
 
void setCairo (cairo_t *pCairo, cairo_surface_t *pSurface)
 
void setFonts (Font *pNormalFont, Font *pBoldFont)
 

Private Types

enum  TerminalModes {
  LineFeedNewLine = 0x1, CursorKey = 0x2, AnsiVt52 = 0x4, Column = 0x8,
  Scrolling = 0x10, Screen = 0x20, Origin = 0x40, AutoWrap = 0x80,
  AutoRepeat = 0x100, Interlace = 0x200, AppKeypad = 0x400, Margin = 0x800,
  Insert = 0x1000
}
 
enum  TerminalFlags {
  Question = 0x1, LeftAngle = 0x2, RightAngle = 0x4, LeftSquare = 0x8,
  RightSquare = 0x10, LeftRound = 0x20, RightRound = 0x40, Dollar = 0x80,
  Apostrophe = 0x100, Quote = 0x200, Space = 0x400, Bang = 0x800,
  Escape = 0x1000, Percent = 0x2000, Asterisk = 0x4000, Plus = 0x8000,
  Minus = 0x10000, Period = 0x20000, Slash = 0x40000, Hash = 0x80000,
  Backslash = 0x100000, Underscore = 0x200000, Vt52SetCursorWaitY = 0x400000, Vt52SetCursorWaitX = 0x800000
}
 

Private Member Functions

 Xterm (const Xterm &)
 
Xtermoperator= (const Xterm &)
 
bool setFlagsForUtf32 (uint32_t utf32)
 

Private Attributes

size_t m_ActiveBuffer
 
Windowm_pWindows [2]
 
XtermCmd m_Cmd
 
XtermOsControl m_OsCtl
 
bool m_bChangingState
 Are we currently interpreting a state change?
 
bool m_bContainedBracket
 
bool m_bContainedParen
 
bool m_bIsOsControl
 
size_t m_Flags
 Flags for this particular sequence.
 
size_t m_Modes
 Currently active modes.
 
char * m_TabStops
 Tab stops.
 
uint32_t m_SavedX
 Saved cursor position.
 
uint32_t m_SavedY
 
class Terminalm_pT
 
bool m_bFbMode
 
class Widgetm_pWidget
 
Tuim_pTui
 
cairo_t * m_pCairo
 
cairo_surface_t * m_pCairoSurface
 
Fontm_pNormalFont
 
Fontm_pBoldFont
 

Detailed Description

Definition at line 44 of file Xterm.h.

Member Enumeration Documentation

enum Xterm::TerminalFlags
private
Enumerator
Question 

Seen a '?' character.

LeftAngle 

Seen a '<' character.

RightAngle 

Seen a '>' character.

LeftSquare 

Seen a '[' character.

RightSquare 

Seen a ']' character.

LeftRound 

Seen a '(' character.

RightRound 

Seen a ')' character.

Dollar 

Seen a '$' character.

Apostrophe 

Seen a '\'' character.

Quote 

Seen a '"' character.

Space 

Seen a ' ' character.

Bang 

Seen a '!' character.

Escape 

Seen a '' (ESC) character.

Percent 

Seen a '' character.

Asterisk 

Seen a '*' character.

Plus 

Seen a '+' character.

Minus 

Seen a '-' character.

Period 

Seen a '.' character.

Slash 

Seen a '/' character.

Hash 

Seen a '#' character.

Backslash 

Seen a '\' character.

Underscore 

Seen a '_' character.

Vt52SetCursorWaitY 

VT52: set cursor, waiting for Y.

Vt52SetCursorWaitX 

VT52: set cursor, waiting for X.

Definition at line 352 of file Xterm.h.

Member Function Documentation

void Xterm::processKey ( uint64_t  key)

Processes the given key and injects to the terminal, based on xterm modes.

Definition at line 152 of file Xterm.cc.

void Xterm::renderAll ( DirtyRectangle rect)

Performs a full re-render.

Definition at line 1554 of file Xterm.cc.

Referenced by Terminal::getSelectFd().

+ Here is the caller graph for this function:

void Xterm::write ( uint32_t  utf32,
DirtyRectangle rect 
)

Writes the given UTF-32 character to the Xterm.

Todo:
Changes how title modes are set...
Todo:
Do something about this.
Todo:
Alternate keypad mode
Note
We don't handle "\e F" (7-bit controls)
Todo:
In VT52 mode, we need to go into VT52 graphics mode...
Todo:
In VT52 mode, exit VT52 graphics mode...

Definition at line 354 of file Xterm.cc.

Member Data Documentation

size_t Xterm::m_ActiveBuffer
private

Current active buffer.

Definition at line 305 of file Xterm.h.

bool Xterm::m_bContainedBracket
private

Did this state include a '['? This changes the way some commands are interpreted.

Definition at line 331 of file Xterm.h.


The documentation for this class was generated from the following files: