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, bool restoreBg=true)
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 gui/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 gui/console.h.

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

Definition at line 67 of file gui/console.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
kBufferSize 
kCharsPerLine 
kHistorySize 

Definition at line 71 of file gui/console.h.

Enumerator:
kNoSlideMode 
kUpSlideMode 
kDownSlideMode 

Definition at line 96 of file gui/console.h.


Constructor & Destructor Documentation

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

Definition at line 53 of file gui/console.cpp.


Member Function Documentation

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

Definition at line 587 of file gui/console.cpp.

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

Definition at line 162 of file gui/console.h.

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

Reimplemented from GUI::Dialog.

Definition at line 162 of file gui/console.cpp.

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

Definition at line 473 of file gui/console.cpp.

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

Definition at line 717 of file gui/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 166 of file gui/console.cpp.

void GUI::ConsoleDialog::drawLine ( int  line,
bool  restoreBg = true 
) [protected]

Definition at line 173 of file gui/console.cpp.

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

Definition at line 157 of file gui/console.h.

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

Definition at line 246 of file gui/console.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 495 of file gui/console.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 258 of file gui/console.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 242 of file gui/console.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 210 of file gui/console.cpp.

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

Definition at line 595 of file gui/console.cpp.

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

Definition at line 92 of file gui/console.cpp.

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

Definition at line 485 of file gui/console.cpp.

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

Definition at line 551 of file gui/console.cpp.

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

Definition at line 566 of file gui/console.cpp.

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

Definition at line 560 of file gui/console.cpp.

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

Definition at line 639 of file gui/console.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 128 of file gui/console.cpp.

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

Definition at line 168 of file gui/console.h.

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

Definition at line 707 of file gui/console.cpp.

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

Definition at line 686 of file gui/console.cpp.

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

Definition at line 694 of file gui/console.cpp.

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

Definition at line 669 of file gui/console.cpp.

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

Reimplemented from GUI::Dialog.

Definition at line 198 of file gui/console.cpp.

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

Definition at line 735 of file gui/console.cpp.

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

Definition at line 152 of file gui/console.h.

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

Definition at line 148 of file gui/console.h.

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

Definition at line 121 of file gui/console.cpp.

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

Definition at line 507 of file gui/console.cpp.

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

Definition at line 651 of file gui/console.cpp.

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

Definition at line 678 of file gui/console.cpp.


Member Data Documentation

Definition at line 126 of file gui/console.h.

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

Definition at line 80 of file gui/console.h.

Definition at line 109 of file gui/console.h.

Definition at line 110 of file gui/console.h.

Definition at line 94 of file gui/console.h.

Definition at line 93 of file gui/console.h.

Definition at line 114 of file gui/console.h.

Definition at line 86 of file gui/console.h.

Definition at line 88 of file gui/console.h.

Definition at line 78 of file gui/console.h.

Definition at line 121 of file gui/console.h.

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

Definition at line 116 of file gui/console.h.

Definition at line 118 of file gui/console.h.

Definition at line 119 of file gui/console.h.

Definition at line 117 of file gui/console.h.

Definition at line 123 of file gui/console.h.

Definition at line 81 of file gui/console.h.

Definition at line 84 of file gui/console.h.

Definition at line 83 of file gui/console.h.

Definition at line 91 of file gui/console.h.

Definition at line 90 of file gui/console.h.

Definition at line 124 of file gui/console.h.

Definition at line 105 of file gui/console.h.

Definition at line 87 of file gui/console.h.

Definition at line 102 of file gui/console.h.

Definition at line 103 of file gui/console.h.

Definition at line 125 of file gui/console.h.

Definition at line 121 of file gui/console.h.


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


Generated on Sat Jan 12 2019 05:04:42 for ResidualVM by doxygen 1.7.1
curved edge   curved edge