summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorerco77 <erco@seriss.com>2023-11-14 07:01:52 -0800
committerGitHub <noreply@github.com>2023-11-14 07:01:52 -0800
commit6842a43a3170c6f7a852186d5688baebdac16e2c (patch)
tree04493580bf8fc798858720c7ab7ffecedeb9ee3e /examples
parent83f6336f3b024f4a7c55a7499d036f03d946c1b9 (diff)
Fl_Terminal widget (#800)
Pull Fl_Terminal widget from Greg's fork
Diffstat (limited to 'examples')
-rw-r--r--examples/simple-terminal.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/simple-terminal.cxx b/examples/simple-terminal.cxx
index f1b6e5d5e..f51dc1bb2 100644
--- a/examples/simple-terminal.cxx
+++ b/examples/simple-terminal.cxx
@@ -1,5 +1,5 @@
//
-// Simple Example app using Fl_Simple_Terminal. - erco 10/12/2017
+// Simple Example app using Fl_Terminal. - erco 10/12/2017
//
// Copyright 2017 Greg Ercolano.
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -15,17 +15,17 @@
// https://www.fltk.org/bugs.php
//
-#include <time.h> //START
+#include <time.h>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
-#include <FL/Fl_Simple_Terminal.H>
+#include <FL/Fl_Terminal.H>
#define TERMINAL_HEIGHT 120
// Globals
Fl_Double_Window *G_win = 0;
Fl_Box *G_box = 0;
-Fl_Simple_Terminal *G_tty = 0;
+Fl_Terminal *G_tty = 0;
// Append a date/time message to the terminal every 2 seconds
void tick_cb(void *data) {
@@ -43,7 +43,7 @@ int main(int argc, char **argv) {
"Your app's debugging output in tty below");
// Add simple terminal to bottom of app window for scrolling history of status messages.
- G_tty = new Fl_Simple_Terminal(0,200,G_win->w(),TERMINAL_HEIGHT);
+ G_tty = new Fl_Terminal(0,200,G_win->w(),TERMINAL_HEIGHT);
G_tty->ansi(true); // enable use of "\033[32m"
G_win->end();
@@ -51,4 +51,4 @@ int main(int argc, char **argv) {
G_win->show();
Fl::add_timeout(0.5, tick_cb);
return Fl::run();
-} //END
+}