ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <console.h>

Inheritance diagram for GUI::ConsoleDialog:
Collaboration diagram for GUI::ConsoleDialog:

List of all members.

Public Types

typedef bool(* InputCallbackProc )(ConsoleDialog *console, const char *input, void *refCon)
typedef bool(* CompletionCallbackProc )(ConsoleDialog *console, const char *input, Common::String &completion, void *refCon)

Public Member Functions

 ConsoleDialog (float widthPercent, float heightPercent)
void open () override
void close () override
void drawDialog (DrawLayer layerToDraw) override
 Draw the dialog in its entirety (background and widgets).
void handleTickle () override
void reflowLayout () override
void handleMouseWheel (int x, int y, int direction) override
void handleKeyDown (Common::KeyState state) override
void handleCommand (CommandSender *sender, uint32 cmd, uint32 data) override
int printFormat (int dummy, const char *format,...) GCC_PRINTF(3
int int vprintFormat (int dummy, const char *format, va_list argptr)
void printChar (int c)
void setInputCallback (InputCallbackProc proc, void *refCon)
void setCompletionCallback (CompletionCallbackProc proc, void *refCon)
int getCharsPerLine ()

Protected Types

enum  { kBufferSize = 32768, kCharsPerLine = 128, kHistorySize = 20 }
enum  SlideMode { kNoSlideMode, kUpSlideMode, kDownSlideMode }

Protected Member Functions

void slideUpAndClose ()
char & buffer (int idx)
void init ()
int pos2line (int pos)
void drawLine (int line)
void drawCaret (bool erase)
void printCharIntern (int c)
void insertIntoPrompt (const char *str)
void print (const char *str)
void updateScrollBuffer ()
void scrollToCurrent ()
Common::String getUserInput ()
void defaultKeyDownHandler (Common::KeyState &state)
void specialKeys (Common::KeyCode keycode)
void nextLine ()
void killChar ()
void killLine ()
void killLastWord ()
void addToHistory (const Common::String &str)
void historyScroll (int direction)

Protected Attributes

const Graphics::Font_font
char _buffer [kBufferSize]
int _linesInBuffer
int _pageWidth
int _linesPerPage
int _currentPos
int _scrollLine
int _firstLineInBuffer
int _promptStartPos
int _promptEndPos
bool _caretVisible
uint32 _caretTime
SlideMode _slideMode
uint32 _slideTime
ScrollBarWidget_scrollBar
InputCallbackProc _callbackProc
void * _callbackRefCon
CompletionCallbackProc _completionCallbackProc
void * _completionCallbackRefCon
Common::String _history [kHistorySize]
int _historySize
int _historyIndex
int _historyLine
float _widthPercent
float _heightPercent
int _leftPadding
int _rightPadding
int _topPadding
int _bottomPadding

Detailed Description

Definition at line 65 of file console.h.


Member Typedef Documentation

typedef bool(* GUI::ConsoleDialog::CompletionCallbackProc)(ConsoleDialog *console, const char *input, Common::String &completion, void *refCon)

Definition at line 68 of file console.h.

typedef bool(* GUI::ConsoleDialog::InputCallbackProc)(ConsoleDialog *console, const char *input, void *refCon)

Definition at line 67 of file console.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
kBufferSize 
kCharsPerLine 
kHistorySize 

Definition at line 71 of file console.h.

Enumerator:
kNoSlideMode 
kUpSlideMode 
kDownSlideMode 

Definition at line 96 of file console.h.


Constructor & Destructor Documentation

GUI::ConsoleDialog::ConsoleDialog ( float  widthPercent,
float  heightPercent 
)

Definition at line 53 of file console.cpp.


Member Function Documentation

void GUI::ConsoleDialog::addToHistory ( const Common::String str  )  [protected]

Definition at line 581 of file console.cpp.

char& GUI::ConsoleDialog::buffer ( int  idx  )  [inline, protected]

Definition at line 162 of file console.h.

void GUI::ConsoleDialog::close (  )  [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 161 of file console.cpp.

void GUI::ConsoleDialog::defaultKeyDownHandler ( Common::KeyState state  )  [protected]

Definition at line 467 of file console.cpp.

void GUI::ConsoleDialog::drawCaret ( bool  erase  )  [protected]

Definition at line 711 of file console.cpp.

void GUI::ConsoleDialog::drawDialog ( DrawLayer  layerToDraw  )  [override, virtual]

Draw the dialog in its entirety (background and widgets).

Reimplemented from GUI::Dialog.

Definition at line 165 of file console.cpp.

void GUI::ConsoleDialog::drawLine ( int  line  )  [protected]

Definition at line 172 of file console.cpp.

int GUI::ConsoleDialog::getCharsPerLine (  )  [inline]

Definition at line 157 of file console.h.

Common::String GUI::ConsoleDialog::getUserInput (  )  [protected]

Definition at line 240 of file console.cpp.

void GUI::ConsoleDialog::handleCommand ( CommandSender sender,
uint32  cmd,
uint32  data 
) [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 489 of file console.cpp.

void GUI::ConsoleDialog::handleKeyDown ( Common::KeyState  state  )  [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 252 of file console.cpp.

void GUI::ConsoleDialog::handleMouseWheel ( int  x,
int  y,
int  direction 
) [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 236 of file console.cpp.

void GUI::ConsoleDialog::handleTickle (  )  [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 204 of file console.cpp.

void GUI::ConsoleDialog::historyScroll ( int  direction  )  [protected]

Definition at line 589 of file console.cpp.

void GUI::ConsoleDialog::init (  )  [protected]

Definition at line 92 of file console.cpp.

void GUI::ConsoleDialog::insertIntoPrompt ( const char *  str  )  [protected]

Definition at line 479 of file console.cpp.

void GUI::ConsoleDialog::killChar (  )  [protected]

Definition at line 545 of file console.cpp.

void GUI::ConsoleDialog::killLastWord (  )  [protected]

Definition at line 560 of file console.cpp.

void GUI::ConsoleDialog::killLine (  )  [protected]

Definition at line 554 of file console.cpp.

void GUI::ConsoleDialog::nextLine (  )  [protected]

Definition at line 633 of file console.cpp.

void GUI::ConsoleDialog::open (  )  [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 127 of file console.cpp.

int GUI::ConsoleDialog::pos2line ( int  pos  )  [inline, protected]

Definition at line 168 of file console.h.

void GUI::ConsoleDialog::print ( const char *  str  )  [protected]

Definition at line 701 of file console.cpp.

void GUI::ConsoleDialog::printChar ( int  c  ) 

Definition at line 680 of file console.cpp.

void GUI::ConsoleDialog::printCharIntern ( int  c  )  [protected]

Definition at line 688 of file console.cpp.

int GUI::ConsoleDialog::printFormat ( int  dummy,
const char *  format,
  ... 
)

Definition at line 663 of file console.cpp.

void GUI::ConsoleDialog::reflowLayout (  )  [override, virtual]

Reimplemented from GUI::Dialog.

Definition at line 192 of file console.cpp.

void GUI::ConsoleDialog::scrollToCurrent (  )  [protected]

Definition at line 729 of file console.cpp.

void GUI::ConsoleDialog::setCompletionCallback ( CompletionCallbackProc  proc,
void *  refCon 
) [inline]

Definition at line 152 of file console.h.

void GUI::ConsoleDialog::setInputCallback ( InputCallbackProc  proc,
void *  refCon 
) [inline]

Definition at line 148 of file console.h.

void GUI::ConsoleDialog::slideUpAndClose (  )  [protected]

Definition at line 120 of file console.cpp.

void GUI::ConsoleDialog::specialKeys ( Common::KeyCode  keycode  )  [protected]

Definition at line 501 of file console.cpp.

void GUI::ConsoleDialog::updateScrollBuffer (  )  [protected]

Definition at line 645 of file console.cpp.

int GUI::ConsoleDialog::vprintFormat ( int  dummy,
const char *  format,
va_list  argptr 
)

Definition at line 672 of file console.cpp.


Member Data Documentation

Definition at line 126 of file console.h.

char GUI::ConsoleDialog::_buffer[kBufferSize] [protected]

Definition at line 80 of file console.h.

Definition at line 109 of file console.h.

Definition at line 110 of file console.h.

Definition at line 94 of file console.h.

Definition at line 93 of file console.h.

Definition at line 114 of file console.h.

Definition at line 86 of file console.h.

Definition at line 88 of file console.h.

Definition at line 78 of file console.h.

Definition at line 121 of file console.h.

Common::String GUI::ConsoleDialog::_history[kHistorySize] [protected]

Definition at line 116 of file console.h.

Definition at line 118 of file console.h.

Definition at line 119 of file console.h.

Definition at line 117 of file console.h.

Definition at line 123 of file console.h.

Definition at line 81 of file console.h.

Definition at line 84 of file console.h.

Definition at line 83 of file console.h.

Definition at line 91 of file console.h.

Definition at line 90 of file console.h.

Definition at line 124 of file console.h.

Definition at line 105 of file console.h.

Definition at line 87 of file console.h.

Definition at line 102 of file console.h.

Definition at line 103 of file console.h.

Definition at line 125 of file console.h.

Definition at line 121 of file console.h.


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


Generated on Sat Aug 17 2019 05:03:04 for ResidualVM by doxygen 1.7.1
curved edge   curved edge