summaryrefslogtreecommitdiff
path: root/examples/textdisplay-with-colors.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-01 18:03:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-06 20:28:20 +0200
commitf09e17c3c564e8310125a10c03397cbf473ff643 (patch)
tree8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /examples/textdisplay-with-colors.cxx
parentb0e0c355edaa2e23148cb0260ada907aec930f05 (diff)
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
Diffstat (limited to 'examples/textdisplay-with-colors.cxx')
-rw-r--r--examples/textdisplay-with-colors.cxx34
1 files changed, 14 insertions, 20 deletions
diff --git a/examples/textdisplay-with-colors.cxx b/examples/textdisplay-with-colors.cxx
index 6c4482402..6d66d2367 100644
--- a/examples/textdisplay-with-colors.cxx
+++ b/examples/textdisplay-with-colors.cxx
@@ -1,14 +1,12 @@
//
-// "$Id$"
+// How to use Fl_Text_Display with colors. -erco 11/09/2010
+// Originally from erco's cheat sheet, permission by author.
//
-// How to use Fl_Text_Display with colors. -erco 11/09/2010
-// Originally from erco's cheat sheet, permission by author.
+// Shows how to use the two Fl_Text_Buffer's needed to manage
+// the text and style info separately.
//
-// Shows how to use the two Fl_Text_Buffer's needed to manage
-// the text and style info separately.
-//
-// For an example of a color text *editor*, see the 'editor'
-// example in the test directory.
+// For an example of a color text *editor*, see the 'editor'
+// example in the test directory.
//
// Copyright 2010 Greg Ercolano.
// Copyright 1998-2010 by Bill Spitzak and others.
@@ -17,11 +15,11 @@
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
-// http://www.fltk.org/COPYING.php
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
@@ -38,22 +36,18 @@ int main() {
};
Fl_Window *win = new Fl_Window(640, 480, "Simple Text Display With Colors");
Fl_Text_Display *disp = new Fl_Text_Display(20, 20, 640-40, 480-40);
- Fl_Text_Buffer *tbuff = new Fl_Text_Buffer(); // text buffer
- Fl_Text_Buffer *sbuff = new Fl_Text_Buffer(); // style buffer
+ Fl_Text_Buffer *tbuff = new Fl_Text_Buffer(); // text buffer
+ Fl_Text_Buffer *sbuff = new Fl_Text_Buffer(); // style buffer
disp->buffer(tbuff);
- int stable_size = sizeof(stable)/sizeof(stable[0]); // # entries in style table (4)
+ int stable_size = sizeof(stable)/sizeof(stable[0]); // # entries in style table (4)
disp->highlight_data(sbuff, stable, stable_size, 'A', 0, 0);
// Text
tbuff->text("Red Line 1\nYel Line 2\nGrn Line 3\nBlu Line 4\n"
- "Red Line 5\nYel Line 6\nGrn Line 7\nBlu Line 8\n");
+ "Red Line 5\nYel Line 6\nGrn Line 7\nBlu Line 8\n");
// Style for text
sbuff->text("AAAAAAAAAA\nBBBBBBBBBB\nCCCCCCCCCC\nDDDDDDDDDD\n"
- "AAAAAAAAAA\nBBBBBBBBBB\nCCCCCCCCCC\nDDDDDDDDDD\n");
+ "AAAAAAAAAA\nBBBBBBBBBB\nCCCCCCCCCC\nDDDDDDDDDD\n");
win->resizable(*disp);
win->show();
return(Fl::run());
}
-
-//
-// End of "$Id$".
-//