FACT++  1.0
void ReadlineWindow::EventHook ( bool  = false)
protectedvirtual

The event hook which is called regularly when a readline call is in progress. We use this to synchronously upadte our prompt (mainly the current cursor position) and refresh the screen, so that all changes get displayed soon.

By default, this will be called at most ten times a second if there is no keyboard input.

Reimplemented from Readline.

Reimplemented in RemoteControl< Shell >.

Definition at line 162 of file ReadlineWindow.cc.

References Readline::EventHook(), and Redisplay().

163 {
165  Redisplay();
166  /*
167  * This doesn't work if the contents of the line changes, e.g. when
168  * the prompt is replaced
169 
170  // Refresh the screen
171  Refresh();
172 
173  // Now move the cursor to its expected position
174  int lines, cols;
175  getmaxyx(fWindow, lines, cols);
176 
177  const int pos = fPromptY*cols + fPromptX + GetAbsCursor();
178  wmove(fWindow, pos/cols, pos%cols);
179 
180  // Make the cursor movement visible on the screen
181  wrefresh(fWindow);
182  */
183 
184  // The lines above are just a simplified version of Redisplay()
185  // which skips all the output.
186 }
virtual void EventHook(bool newline=false)
Definition: Readline.cc:315

+ Here is the call graph for this function: