diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-03-16 17:16:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-16 17:16:12 -0400 |
| commit | 51a55bc73660f64e8f4b32b8b4d3858f2a786f7b (patch) | |
| tree | 122ad9f838fcf8f61ed7cf5fa031e8ed69817e10 /fluid/widgets | |
| parent | 13a7073a1e007ce5b71ef70bced1a9b15158820d (diff) | |
Fluid: restructuring and rejuvenation of the source code.
* Add classes for application and project
* Removed all globals from Fluid.h
* Extracting args and project history into their own classes
* Moving globals into Application class
* Initialize values inside headers for some classes.
* Undo functionality wrapped in a class inside Project.
* File reader and writer are now linked to a project.
* Avoid global project access
* Nodes (former Types) will be managed by a new Tree class.
* Removed static members (hidden globals) form Node/Fl_Type.
* Adding Tree iterator.
* Use nullptr instead of 0, NULL, or 0L
* Renamed Fl_..._Type to ..._Node, FL_OVERRIDE -> override
* Renaming ..._type to ...::prototype
* Splitting Widget Panel into multiple files.
* Moved callback code into widget panel file.
* Cleaning up Fluid_Image -> Image_asset
* Moving Fd_Snap_Action into new namespace fld::app::Snap_Action etc.
* Moved mergeback into proj folder.
* `enum ID` is now `enum class Type`.
Diffstat (limited to 'fluid/widgets')
| -rw-r--r-- | fluid/widgets/Bin_Button.cxx | 20 | ||||
| -rw-r--r-- | fluid/widgets/Code_Editor.cxx | 7 | ||||
| -rw-r--r-- | fluid/widgets/Code_Editor.h | 5 | ||||
| -rw-r--r-- | fluid/widgets/Code_Viewer.cxx | 5 | ||||
| -rw-r--r-- | fluid/widgets/Code_Viewer.h | 5 | ||||
| -rw-r--r-- | fluid/widgets/Formula_Input.cxx | 4 | ||||
| -rw-r--r-- | fluid/widgets/Formula_Input.h | 4 | ||||
| -rw-r--r-- | fluid/widgets/Node_Browser.cxx | 96 | ||||
| -rw-r--r-- | fluid/widgets/Node_Browser.h | 18 | ||||
| -rw-r--r-- | fluid/widgets/Text_Viewer.cxx | 5 | ||||
| -rw-r--r-- | fluid/widgets/Text_Viewer.h | 3 |
11 files changed, 87 insertions, 85 deletions
diff --git a/fluid/widgets/Bin_Button.cxx b/fluid/widgets/Bin_Button.cxx index 308d12234..32630369a 100644 --- a/fluid/widgets/Bin_Button.cxx +++ b/fluid/widgets/Bin_Button.cxx @@ -16,9 +16,9 @@ #include "widgets/Bin_Button.h" -#include "app/fluid.h" +#include "Fluid.h" #include "nodes/factory.h" -#include "nodes/Fl_Window_Type.h" +#include "nodes/Window_Node.h" #include "widgets/Node_Browser.h" #include <FL/Fl_Button.H> @@ -57,7 +57,7 @@ int fld::widget::Bin_Button::handle(int inEvent) Fl_Button::handle(FL_RELEASE); // make it into a dnd event const char *type_name = (const char*)user_data(); - Fl_Type::current_dnd = Fl_Type::current; + Fluid.proj.tree.current_dnd = Fluid.proj.tree.current; Fl::copy(type_name, (int)strlen(type_name)+1, 0); Fl::dnd(); return 1; @@ -81,7 +81,7 @@ int fld::widget::Bin_Button::handle(int inEvent) */ int fld::widget::Bin_Window_Button::handle(int inEvent) { - static Fl_Window *drag_win = NULL; + static Fl_Window *drag_win = nullptr; int ret = 0; switch (inEvent) { case FL_PUSH: @@ -107,18 +107,18 @@ int fld::widget::Bin_Window_Button::handle(int inEvent) case FL_RELEASE: if (drag_win) { Fl::delete_widget(drag_win); - drag_win = NULL; + drag_win = nullptr; // create a new window here - Fl_Type *prototype = typename_to_prototype((char*)user_data()); + Node *prototype = typename_to_prototype((char*)user_data()); if (prototype) { - Fl_Type *new_type = add_new_widget_from_user(prototype, Strategy::AFTER_CURRENT); - if (new_type && new_type->is_a(ID_Window)) { - Fl_Window_Type *new_window = (Fl_Window_Type*)new_type; + Node *new_type = add_new_widget_from_user(prototype, Strategy::AFTER_CURRENT); + if (new_type && new_type->is_a(Type::Window)) { + Window_Node *new_window = (Window_Node*)new_type; Fl_Window *w = (Fl_Window *)new_window->o; w->position(Fl::event_x_root(), Fl::event_y_root()); } } - widget_browser->display(Fl_Type::current); + widget_browser->display(Fluid.proj.tree.current); widget_browser->rebuild(); } return Fl_Button::handle(inEvent); diff --git a/fluid/widgets/Code_Editor.cxx b/fluid/widgets/Code_Editor.cxx index a145b5055..b4379c845 100644 --- a/fluid/widgets/Code_Editor.cxx +++ b/fluid/widgets/Code_Editor.cxx @@ -1,6 +1,5 @@ // // Code editor widget for the Fast Light Tool Kit (FLTK). -// Syntax highlighting rewritten by erco@seriss.com 09/15/20. // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -15,6 +14,8 @@ // https://www.fltk.org/bugs.php // +// Syntax highlighting rewritten by erco@seriss.com 09/15/20. + // // Include necessary headers... // @@ -230,11 +231,11 @@ Code_Editor::Code_Editor(int X, int Y, int W, int H, const char *L) : */ Code_Editor::~Code_Editor() { Fl_Text_Buffer *buf = mStyleBuffer; - mStyleBuffer = 0; + mStyleBuffer = nullptr; delete buf; buf = mBuffer; - buffer(0); + buffer(nullptr); delete buf; } diff --git a/fluid/widgets/Code_Editor.h b/fluid/widgets/Code_Editor.h index ef8df0e0d..49afe7e25 100644 --- a/fluid/widgets/Code_Editor.h +++ b/fluid/widgets/Code_Editor.h @@ -1,6 +1,5 @@ // // Code editor widget for the Fast Light Tool Kit (FLTK). -// Syntax highlighting rewritten by erco@seriss.com 09/15/20. // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -18,6 +17,8 @@ #ifndef FLUID_WIDGETS_CODE_EDITOR_H #define FLUID_WIDGETS_CODE_EDITOR_H +// Syntax highlighting rewritten by erco@seriss.com 09/15/20. + // // Include necessary headers... // @@ -49,7 +50,7 @@ class Code_Editor : public Fl_Text_Editor { static int auto_indent(int, Code_Editor* e); public: - Code_Editor(int X, int Y, int W, int H, const char *L=0); + Code_Editor(int X, int Y, int W, int H, const char *L=nullptr); ~Code_Editor(); void textsize(Fl_Fontsize s); diff --git a/fluid/widgets/Code_Viewer.cxx b/fluid/widgets/Code_Viewer.cxx index 82a71f4f6..fdbfdc626 100644 --- a/fluid/widgets/Code_Viewer.cxx +++ b/fluid/widgets/Code_Viewer.cxx @@ -1,6 +1,5 @@ // -// Code editor widget for the Fast Light Tool Kit (FLTK). -// Syntax highlighting rewritten by erco@seriss.com 09/15/20. +// Code viewer widget for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -15,6 +14,8 @@ // https://www.fltk.org/bugs.php // +// Syntax highlighting rewritten by erco@seriss.com 09/15/20. + // // Include necessary headers... // diff --git a/fluid/widgets/Code_Viewer.h b/fluid/widgets/Code_Viewer.h index 5bf8b870a..4198fd433 100644 --- a/fluid/widgets/Code_Viewer.h +++ b/fluid/widgets/Code_Viewer.h @@ -1,6 +1,5 @@ // -// Code editor widget for the Fast Light Tool Kit (FLTK). -// Syntax highlighting rewritten by erco@seriss.com 09/15/20. +// Code viewer widget for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -18,6 +17,8 @@ #ifndef FLUID_WIDGETS_CODE_VIEWER_H #define FLUID_WIDGETS_CODE_VIEWER_H +// Syntax highlighting rewritten by erco@seriss.com 09/15/20. + // // Include necessary headers... // diff --git a/fluid/widgets/Formula_Input.cxx b/fluid/widgets/Formula_Input.cxx index b26bd83e3..dadebe674 100644 --- a/fluid/widgets/Formula_Input.cxx +++ b/fluid/widgets/Formula_Input.cxx @@ -1,5 +1,5 @@ // -// Widget type code for the Fast Light Tool Kit (FLTK). +// Formula Int Input widget code for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -209,7 +209,7 @@ int Formula_Input::handle(int event) { } /** Set the list of the available variables - \param vars array of variables, last entry `has name_` set to `NULL` + \param vars array of variables, last entry `has name_` set to `nullptr` \param user_data is forwarded to the Variable callback */ void Formula_Input::variables(Formula_Input_Vars *vars, void *user_data) { vars_ = vars; diff --git a/fluid/widgets/Formula_Input.h b/fluid/widgets/Formula_Input.h index 5307cdc88..060c1e157 100644 --- a/fluid/widgets/Formula_Input.h +++ b/fluid/widgets/Formula_Input.h @@ -1,5 +1,5 @@ // -// Formula_Input widget header file for the Fast Light Tool Kit (FLTK). +// Formula Int Input widget header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -29,7 +29,7 @@ typedef int (Fluid_Coord_Callback)(Formula_Input const *, void*); // Entry for a list of variables available to an input field. // Formula_Input::variables() expects an array of -// Formula_Input_Vars with the last entry's name_ set to NULL. +// Formula_Input_Vars with the last entry's name_ set to nullptr. typedef struct Formula_Input_Vars { const char *name_; Fluid_Coord_Callback *callback_; diff --git a/fluid/widgets/Node_Browser.cxx b/fluid/widgets/Node_Browser.cxx index fafe236cf..745282e23 100644 --- a/fluid/widgets/Node_Browser.cxx +++ b/fluid/widgets/Node_Browser.cxx @@ -1,5 +1,5 @@ // -// Widget Browser code for the Fast Light Tool Kit (FLTK). +// Widget Tree Browser code for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -16,8 +16,8 @@ #include "widgets/Node_Browser.h" -#include "app/fluid.h" -#include "nodes/Fl_Widget_Type.h" +#include "Fluid.h" +#include "nodes/Widget_Node.h" #include "rsrcs/pixmaps.h" #include <FL/Fl.H> @@ -41,9 +41,9 @@ using namespace fld::widget; The Widget Browser is derived from the FLTK basic browser, extending tree browsing functionality by using the \c depth component of the double - linked list of \c Fl_Type items. + linked list of \c Node items. - \see Fl_Type + \see Node */ @@ -81,9 +81,9 @@ Fl_Widget *make_widget_browser(int x,int y,int w,int h) { /** Make sure that the caller is visible in the widget browser. \param[in] caller scroll the browser in y so that caller - is visible (may be NULL) + is visible (may be nullptr) */ -void redraw_widget_browser(Fl_Type *caller) +void redraw_widget_browser(Node *caller) { if (caller) widget_browser->display(caller); @@ -95,7 +95,7 @@ void redraw_widget_browser(Fl_Type *caller) \param[in] o (de)select this node \param[in] v the new selection state (1=select, 0=de-select) */ -void select(Fl_Type *o, int v) { +void select(Node *o, int v) { widget_browser->select(o,v,1); } @@ -103,7 +103,7 @@ void select(Fl_Type *o, int v) { Select a single node in the widget browser, deselect all others. \param[in] o select this node */ -void select_only(Fl_Type *o) { +void select_only(Node *o) { widget_browser->select_only(o,1); } @@ -122,8 +122,8 @@ void deselect() { \param[in] t show this item */ -void reveal_in_browser(Fl_Type *t) { - Fl_Type *p = t->parent; +void reveal_in_browser(Node *t) { + Node *p = t->parent; if (p) { for (;;) { if (p->folded_) @@ -165,7 +165,7 @@ static char *copy_trunc(char *p, const char *str, int maxl, int quote, int trunc { int size = 0; // truncated string size in characters int bs; // size of UTF-8 character in bytes - if (!p) return NULL; // bad buffer + if (!p) return nullptr; // bad buffer if (!str) { // no input string if (quote) { *p++='"'; *p++='"'; } *p = 0; @@ -206,7 +206,7 @@ static char *copy_trunc(char *p, const char *str, int maxl, int quote, int trunc Fluid currently generates only one instance of this browser. If we want to use multiple browser at some point, we need to refactor a few global - variables, i.e. Fl_Type::first and Fl_Type::last . + variables, i.e. Fluid.proj.tree.first and Fluid.proj.tree.last . \param[in] X, Y, W, H position and size of widget \param[in] l optional label @@ -226,25 +226,25 @@ Node_Browser::Node_Browser(int X,int Y,int W,int H,const char*l) : \return the first item */ void *Node_Browser::item_first() const { - return Fl_Type::first; + return Fluid.proj.tree.first; } /** Override the method to find the next item in the list of elements. \param l this item - \return the next item, irregardless of tree depth, or NULL at the end + \return the next item, irregardless of tree depth, or nullptr at the end */ void *Node_Browser::item_next(void *l) const { - return ((Fl_Type*)l)->next; + return ((Node*)l)->next; } /** Override the method to find the previous item in the list of elements. \param l this item - \return the previous item, irregardless of tree depth, or NULL at the start + \return the previous item, irregardless of tree depth, or nullptr at the start */ void *Node_Browser::item_prev(void *l) const { - return ((Fl_Type*)l)->prev; + return ((Node*)l)->prev; } /** @@ -254,7 +254,7 @@ void *Node_Browser::item_prev(void *l) const { \todo what is the difference between selected and new_selected, and why do we do this? */ int Node_Browser::item_selected(void *l) const { - return ((Fl_Type*)l)->new_selected; + return ((Node*)l)->new_selected; } /** @@ -263,7 +263,7 @@ int Node_Browser::item_selected(void *l) const { \param[in] v 1 if selecting, 0 if not */ void Node_Browser::item_select(void *l,int v) { - ((Fl_Type*)l)->new_selected = v; + ((Node*)l)->new_selected = v; } /** @@ -272,9 +272,9 @@ void Node_Browser::item_select(void *l,int v) { \return height in FLTK units (used to be pixels before high res screens) */ int Node_Browser::item_height(void *l) const { - Fl_Type *t = (Fl_Type*)l; + Node *t = (Node*)l; if (t->visible) { - if (show_comments && t->comment()) + if (Fluid.show_comments && t->comment()) return textsize()*2+4; else return textsize()+5; @@ -307,13 +307,13 @@ int Node_Browser::incr_height() const { text, possibly abbreviated with an ellipsis. \param v v is a pointer to the actual widget type and can be cast safely - to Fl_Type + to Node \param X,Y these give the position in window coordinates of the top left corner of this line */ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { // cast to a more general type - Fl_Type *l = (Fl_Type *)v; + Node *l = (Node *)v; char buf[500]; // edit buffer: large enough to hold 80 UTF-8 chars + nul @@ -331,7 +331,7 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { // items can contain a comment. If they do, the comment gets a second text // line inside this browser line int comment_incr = 0; - if (show_comments && l->comment()) { + if (Fluid.show_comments && l->comment()) { // -- comment copy_trunc(buf, l->comment(), 80, 0, 1); comment_incr = textsize()-1; @@ -370,7 +370,7 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { } // Width=18: Draw the icon associated with the type. - Fl_Pixmap *pm = pixmap[l->id()]; + Fl_Pixmap *pm = pixmap[(int)l->type()]; if (pm) pm->draw(X-18, Y); // Add tags on top of the icon for locked and protected types. @@ -380,11 +380,11 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { } if ( l->is_widget() - && !l->is_a(ID_Window) - && ((Fl_Widget_Type*)l)->o - && !((Fl_Widget_Type*)l)->o->visible() - && (!l->parent || ( !l->parent->is_a(ID_Tabs) - && !l->parent->is_a(ID_Wizard) ) ) + && !l->is_a(Type::Window) + && ((Widget_Node*)l)->o + && !((Widget_Node*)l)->o->visible() + && (!l->parent || ( !l->parent->is_a(Type::Tabs) + && !l->parent->is_a(Type::Wizard) ) ) ) { invisible_pixmap->draw(X - 17, Y); @@ -424,7 +424,7 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { else fl_color(func_color); copy_trunc(buf, l->title(), 55, 0, 0); } else { - if (l->is_a(ID_Comment)) { + if (l->is_a(Type::Comment)) { // -- comment (in main line, not above entry) fl_font(comment_font, textsize()); if (l->new_selected) fl_color(fl_contrast(comment_color, FL_SELECTION_COLOR)); @@ -458,7 +458,7 @@ int Node_Browser::item_width(void *v) const { char buf[500]; // edit buffer: large enough to hold 80 UTF-8 chars + nul - Fl_Type *l = (Fl_Type *)v; + Node *l = (Node *)v; if (!l->visible) return 0; @@ -490,7 +490,7 @@ int Node_Browser::item_width(void *v) const { Callback to tell the Fluid UI when the list of selected items changed. */ void Node_Browser::callback() { - selection_changed((Fl_Type*)selection()); + selection_changed((Node*)selection()); } /** @@ -508,13 +508,13 @@ void Node_Browser::callback() { \return 0 if the event is not supported, and 1 if the event was "used up" */ int Node_Browser::handle(int e) { - static Fl_Type *title; - Fl_Type *l; + static Node *title; + Node *l; int X,Y,W,H; bbox(X,Y,W,H); switch (e) { case FL_PUSH: if (!Fl::event_inside(X,Y,W,H)) break; - l = (Fl_Type*)find_item(Fl::event_y()); + l = (Node*)find_item(Fl::event_y()); if (l) { X += 3 + 12*l->level - hposition(); if (l->can_have_children() && Fl::event_x()>X && Fl::event_x()<X+13) { @@ -526,11 +526,11 @@ int Node_Browser::handle(int e) { break; case FL_DRAG: if (!title) break; - l = (Fl_Type*)find_item(Fl::event_y()); + l = (Node*)find_item(Fl::event_y()); if (l) { X += 3 + 12*l->level - hposition(); if (l->can_have_children() && Fl::event_x()>X && Fl::event_x()<X+13) ; - else l = 0; + else l = nullptr; } if (l != pushedtitle) { if (pushedtitle) redraw_line(pushedtitle); @@ -540,7 +540,7 @@ int Node_Browser::handle(int e) { return 1; case FL_RELEASE: if (!title) { - l = (Fl_Type*)find_item(Fl::event_y()); + l = (Node*)find_item(Fl::event_y()); if (l && l->new_selected && (Fl::event_clicks() || Fl::event_state(FL_CTRL))) l->open(); break; @@ -550,14 +550,14 @@ int Node_Browser::handle(int e) { if (l) { if (!l->folded_) { l->folded_ = 1; - for (Fl_Type*k = l->next; k&&k->level>l->level; k = k->next) + for (Node*k = l->next; k&&k->level>l->level; k = k->next) k->visible = 0; } else { l->folded_ = 0; - for (Fl_Type*k=l->next; k&&k->level>l->level;) { + for (Node*k=l->next; k&&k->level>l->level;) { k->visible = 1; if (k->can_have_children() && k->folded_) { - Fl_Type *j; + Node *j; for (j = k->next; j && j->level>k->level; j = j->next) {/*empty*/} k = j; } else @@ -602,9 +602,9 @@ void Node_Browser::rebuild() { /** Rebuild the browser layout and make sure that the given item is visible. - \param[in] inNode pointer to a widget node derived from Fl_Type. + \param[in] inNode pointer to a widget node derived from Node. */ -void Node_Browser::display(Fl_Type *inNode) { +void Node_Browser::display(Node *inNode) { if (!inNode) { // Alternative: find the first (last?) visible selected item. return; @@ -613,7 +613,7 @@ void Node_Browser::display(Fl_Type *inNode) { int currentV = vposition(), newV = currentV; int nodeV = 0; // find the inNode in the tree and check, if it is already visible - Fl_Type *p=Fl_Type::first; + Node *p=Fluid.proj.tree.first; for ( ; p && p!=inNode; p=p->next) { if (p->visible) nodeV += item_height(p) + linespacing(); @@ -640,7 +640,7 @@ void Node_Browser::display(Fl_Type *inNode) { void Node_Browser::load_prefs() { int c; - Fl_Preferences p(fluid_prefs, "widget_browser"); + Fl_Preferences p(Fluid.preferences, "widget_browser"); p.get("label_color", c, 72); label_color = c; p.get("label_font", c, FL_HELVETICA); label_font = c; p.get("class_color", c, FL_FOREGROUND_COLOR); class_color = c; @@ -656,7 +656,7 @@ void Node_Browser::load_prefs() { } void Node_Browser::save_prefs() { - Fl_Preferences p(fluid_prefs, "widget_browser"); + Fl_Preferences p(Fluid.preferences, "widget_browser"); p.set("label_color", (int)label_color); p.set("label_font", (int)label_font); p.set("class_color", (int)class_color); diff --git a/fluid/widgets/Node_Browser.h b/fluid/widgets/Node_Browser.h index 5ac74b50a..eec1e7960 100644 --- a/fluid/widgets/Node_Browser.h +++ b/fluid/widgets/Node_Browser.h @@ -1,5 +1,5 @@ // -// Widget Browser code for the Fast Light Tool Kit (FLTK). +// Widget Tree Browser code for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -19,20 +19,20 @@ #include <FL/Fl_Browser_.H> -class Fl_Type; +class Node; namespace fld { namespace widget { class Node_Browser : public Fl_Browser_ { - friend class Fl_Type; + friend class Node; static void callback_stub(Fl_Widget *o, void *) { ((Node_Browser *)o)->callback(); } - Fl_Type* pushedtitle { nullptr }; + Node* pushedtitle { nullptr }; int saved_h_scroll_ { 0 }; int saved_v_scroll_ { 0 }; @@ -55,7 +55,7 @@ public: void restore_scroll_position(); void rebuild(); void new_list() { Fl_Browser_::new_list(); } - void display(Fl_Type *); + void display(Node *); void load_prefs(); void save_prefs(); @@ -78,11 +78,11 @@ public: extern void redraw_browser(); extern Fl_Widget *make_widget_browser(int x,int y,int w,int h); -extern void redraw_widget_browser(Fl_Type *caller); -extern void select(Fl_Type *o, int v); -extern void select_only(Fl_Type *o); +extern void redraw_widget_browser(Node *caller); +extern void select(Node *o, int v); +extern void select_only(Node *o); extern void deselect(); -extern void reveal_in_browser(Fl_Type *t); +extern void reveal_in_browser(Node *t); extern fld::widget::Node_Browser *widget_browser; diff --git a/fluid/widgets/Text_Viewer.cxx b/fluid/widgets/Text_Viewer.cxx index ba2d145fe..5ae821d6b 100644 --- a/fluid/widgets/Text_Viewer.cxx +++ b/fluid/widgets/Text_Viewer.cxx @@ -1,6 +1,5 @@ // -// Code editor widget for the Fast Light Tool Kit (FLTK). -// Syntax highlighting rewritten by erco@seriss.com 09/15/20. +// Text Viewer widget for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // @@ -40,7 +39,7 @@ Text_Viewer::Text_Viewer(int X, int Y, int W, int H, const char *L) */ Text_Viewer::~Text_Viewer() { Fl_Text_Buffer *buf = mBuffer; - buffer(0); + buffer(nullptr); delete buf; } diff --git a/fluid/widgets/Text_Viewer.h b/fluid/widgets/Text_Viewer.h index 1e5810d50..98fa9200f 100644 --- a/fluid/widgets/Text_Viewer.h +++ b/fluid/widgets/Text_Viewer.h @@ -1,6 +1,5 @@ // -// Code editor widget for the Fast Light Tool Kit (FLTK). -// Syntax highlighting rewritten by erco@seriss.com 09/15/20. +// Text Viewer widget for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2025 by Bill Spitzak and others. // |
