Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5246 in orxonox.OLD for trunk/src/lib/shell/shell.cc


Ignore:
Timestamp:
Sep 24, 2005, 9:20:49 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minimalized the ShellBuffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell.cc

    r5245 r5246  
    5656  // EVENT-Handler subscription of '`' to all States.
    5757  EventHandler::getInstance()->subscribe(this, ES_ALL, SDLK_BACKQUOTE);
     58  EventHandler::getInstance()->subscribe(this, ES_SHELL, SDLK_PAGEUP);
     59  EventHandler::getInstance()->subscribe(this, ES_SHELL, SDLK_PAGEDOWN);
    5860
    5961  // Element2D and generals
     
    6668  this->bufferText = NULL;
    6769  this->bufferDisplaySize = 10;
     70  this->bufferOffset = 0;
    6871
    6972  // INPUT LINE
     
    7275
    7376  this->rebuildText();
    74 
    7577}
    7678
     
    104106  this->setRelCoorSoft2D(0, 0, 1, 5);
    105107
    106   ShellBuffer::getInstance()->getBufferIterator()->lastElement();
    107   for (unsigned int i = 0; i < this->bufferDisplaySize; i++)
    108     this->bufferText[i]->setText(ShellBuffer::getInstance()->getBufferIterator()->prevElement(), true);
     108  tIterator<char>* bufferIT = ShellBuffer::getInstance()->getBuffer()->getIterator();
     109  bufferIT->lastElement();
     110  for (int i = 0; i < this->bufferDisplaySize; i++)
     111    this->bufferText[i]->setText(bufferIT->prevElement(), true);
     112  delete bufferIT;
    109113}
    110114
     
    121125  this->setRelCoorSoft2D(0, -400, 1, 5);
    122126
    123   ShellBuffer::getInstance()->getBufferIterator()->lastElement();
     127  tIterator<char>* bufferIT = ShellBuffer::getInstance()->getBuffer()->getIterator();
     128  bufferIT->lastElement();
    124129  for (int i = 0; i < this->bufferDisplaySize; i++)
    125     this->bufferText[i]->setText(ShellBuffer::getInstance()->getBufferIterator()->prevElement(), false);
    126 }
    127 
     130    this->bufferText[i]->setText(bufferIT->prevElement(), false);
     131  delete bufferIT;
     132}
    128133
    129134/**
     
    199204      this->bufferText[i]->setText(NULL, true);
    200205    }
    201   // BUFFER FLUSHING
     206
     207    ShellBuffer::getInstance()->flush();
     208    // BUFFER FLUSHING
    202209}
    203210
     
    231238
    232239/**
     240 * moves the Display buffer (up or down)
     241 * @param lineCount the count by which to shift the InputBuffer.
     242 */
     243void Shell::moveDisplayBuffer(int lineCount)
     244{
     245
     246
     247}
     248
     249/**
    233250 * clears the Shell (empties all buffers)
    234251 */
     
    253270      else
    254271        this->deactivate();
     272    }
     273    else if (event.type == SDLK_PAGEUP)
     274    {
     275
     276    }
     277    else if (event.type == SDLK_PAGEDOWN)
     278    {
     279
    255280    }
    256281  }
Note: See TracChangeset for help on using the changeset viewer.