diff options
Diffstat (limited to 'fluid/CodeEditor.h')
| -rw-r--r-- | fluid/CodeEditor.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/fluid/CodeEditor.h b/fluid/CodeEditor.h index e865ac63e..bf4b7b499 100644 --- a/fluid/CodeEditor.h +++ b/fluid/CodeEditor.h @@ -1,7 +1,7 @@ // // Code editor widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2020 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -15,29 +15,28 @@ // #ifndef CodeEditor_h -# define CodeEditor_h +#define CodeEditor_h // // Include necessary headers... // -# include <stdio.h> -# include <stdlib.h> -# include <string.h> -# include <ctype.h> -# include <FL/Fl.H> -# include <FL/Fl_Text_Buffer.H> -# include <FL/Fl_Text_Editor.H> - +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <FL/Fl.H> +#include <FL/Fl_Text_Buffer.H> +#include <FL/Fl_Text_Editor.H> +#include "StyleParse.h" class CodeEditor : public Fl_Text_Editor { - static Fl_Text_Display::Style_Table_Entry styletable[]; - static const char * const code_keywords[]; - static const char * const code_types[]; + friend class StyleParse; + static Fl_Text_Display::Style_Table_Entry styletable[]; // 'style_parse()' - Parse text and produce style data. - static void style_parse(const char *text, char *style, int length); + static void style_parse(const char *tbuff, char *sbuff, int len, char style); // 'style_unfinished_cb()' - Update unfinished styles. static void style_unfinished_cb(int, void*); @@ -57,7 +56,6 @@ class CodeEditor : public Fl_Text_Editor { // attempt to make the fluid code editor widget honour textsize setting void textsize(Fl_Fontsize s); - }; class CodeViewer : public CodeEditor { |
