#include <vtql_base.h>
Public Methods | |
AlevtPage () | |
Does not init the page. | |
bool | ReadLine (const std::string &line) |
Fill the page with a line of the command output. More... | |
size_t | GetPng (char *image, int comp=0, bool reveal=false) |
Get a png image of the page. More... | |
std::string | GetTxt (bool ansi=true, bool reveal=false) |
Get a color ansi or plain text output of the page. More... | |
Public Attributes | |
vt_page | pg |
The page as vt_page. More... |
You can fill this class with the output if a PAGE ... HEX command. It should create the same output as the alevt programs do it (e.g. alevt-cap), since it uses its source code (thanks to the nice and reusable code of alevt).
|
Fill the page with a line of the command output. Indeed, you have to call this method 26 times, i.e. 25 times for the 25 lines of a videotext page, hexadecimal encoded from a VTQLserver and a 26th time for the additional information of a page_info line, encoded as 26th line in PAGE ... HEX mode. At this 26th call you get a true back to indicate, that the page has been read completly. If you call it more then 26 times, it starts to overwrite the old lines and returns true at the 52th call.
|
|
Get a png image of the page.
|
|
Get a color ansi or plain text output of the page. Color ansi means, that this method inserts escape codes into the videotext page. This escape codes will be interpreted as color attributs on a color terminal (e.g. this method is heavily used by console_vt.
|
|
The page as vt_page. Use this, if you know about the alevt structure vt_page. |