(Direct child class of XMWindow) This is a standard text window class used for the output of status information. It's basically just a big character buffer. Example: $win = new XMTextWindow(); # it's still hidden $win->move(0, 0); $win->resizeChars(30, 100); $win->show(); $win->setCursor(14, 0); $win->print("Some nice heading\n");
Synopsis: XMTextWindow::clearEOL( ) Clear from the current cursor position to the end of the line. Example: $win->setCursor(13, 14); $win->clearEOL();
Synopsis: XMTextWindow::clearLine( ) Clear the current line (the one the cursor is in). Example: $win->setCursor(0, 25); $win->clearLine();
Synopsis: XMTextWindow::getCharAt( x, y ) Return the character you can see at position (x, y) inside the window. Example: $char = $win->getCharAt(2, 5);
Synopsis: XMTextWindow::getColumns( ) Get the window's width in columns, e.g. how many characters fit into a line. Example: $width = $win->getColumns();
Synopsis: XMTextWindow::getCursorX( ) Get the x-coordinate of the current cursor position. Example: $x = $win->getCursorX();
Synopsis: XMTextWindow::getCursorY( ) Get the y-coordinate of the current cursor position. Example: $y = $win->getCursorY();
Synopsis: XMTextWindow::getLines( ) Get the window's height in lines, e.g. how many characters fit into a row. Example: $height = $win->getLines()
Synopsis: XMTextWindow::newline( ) The same as $win->print("\n") would do on a XMTextBufferWindow. XMTextWindows don't evaluate \n, so you have to use newline() instead. Example: $win->print("Hallo"); $win->newline();
Synopsis: XMTextWindow::print( text ) Print some text to the window. ANSI control sequences are not processed, use printANSI for text directly from the mud server. Example: $win->print("Hey\nnext line\n")
Synopsis: XMTextWindow::printANSI( text ) Print ANSI formatted text to the window. You can simply pass anything coming from the server. Pay attention when using regexps on ANSI formatted text! Example: $win->printANSI($textFromServer);
Synopsis: XMTextWindow::resetAttributes( ) Reset all ANSI attributes (color and state). Example: $win->setBold(1); $win->setBGColor(RED); $win->print("bold and red"); $win->resetAttributes(); $win->print("just plain");
Synopsis: XMTextWindow::resizeChars( width, height ) Resize the window so that exactly width characters fit in a line and height characters in a row. Example: $win->resizeChars(23, 42);
Synopsis: XMTextWindow::scrollColumns( num ) Scroll the window's content by num columns. A positive value means scrolling right, a negative scrolling to the left. Example: $win->scrollColumns(3);
Synopsis: XMTextWindow::scrollLines( num ) Scroll the window's content by num lines. A positive value means scrolling down (like the page down key), a negative scrolling up. Example: $win->scrollLines(-3);
Synopsis: XMTextWindow::setBold( state ) Set the default printing style to bold, if state is true, otherwise to unbold. Example: $win->setBold(1);
Synopsis: XMTextWindow::setBlinking( state ) THIS IS CURRENTLY _NOT_ SUPPORTED!!!!!!! Set the default printing style to blinking, if state is true, otherwise to unblinking. Example: $win->setBlinking(1);
Synopsis: XMTextWindow::setCursor( x, y ) Set the cursor to position (x, y) inside the window. Example: $win->setCursor(4, 4);
Synopsis: XMTextWindow::setFont( name, size ) Set the window's font to name and size. Example: $win->setFont("fixed", 15); # somehow large...
Synopsis: XMTextWindow::setIntensive( state ) Set the default printing style to intensive, if state is true, otherwise to unintensive. Example: $win->setIntensive(1);
Synopsis: XMTextWindow::setReverse( state ) Set the default printing style to reverse, if state is true, otherwise to unreverse. Example: $win->setReverse(1);
Synopsis: XMTextWindow::setUnderline( state ) Set the default printing style to underline, if state is true, otherwise to ununderline. Example: $win->setUnderline(1);