Bugz Door Project
Public Member Functions | Private Attributes | Friends | List of all members
door::Goto Class Reference

ANSI Goto X, Y position. More...

#include <door.h>

Public Member Functions

 Goto (int xpos, int ypos)
 
 Goto (const Goto &)=default
 
void set (int xpos, int ypos)
 

Private Attributes

int x
 X-Position.
 
int y
 Y-Position.
 

Friends

std::ostream & operator<< (std::ostream &os, const Goto &g)
 

Detailed Description

ANSI Goto X, Y position.

This handles outputting ANSI codes to position the cursor on the screen.

Examples
menu-example.cpp.

Constructor & Destructor Documentation

◆ Goto() [1/2]

door::Goto::Goto ( int  xpos,
int  ypos 
)

Construct a new Goto:: Goto object

Parameters
xpos
ypos

◆ Goto() [2/2]

door::Goto::Goto ( const Goto )
default

Default Goto constructor copier

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Goto g 
)
friend

Output the ANSI codes to position the cursor to the given y,x position.

Todo:

Optimize the ANSI goto string output.

Update the Door object so it know where the cursor is positioned.

Parameters
osstd::ostream
gconst Goto
Returns
std::ostream&

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