diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 02:33:41 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 02:33:41 +0500 |
| commit | 43e0a37906afabb0b3b091b8d3eac9a910cae50c (patch) | |
| tree | d2a037c2bf0dc395fddb08e32ebfcf2795503b7c /fluid/widgets | |
| parent | 4ce4967c33d56e4b56d85d11fe0e0be91e159f5d (diff) | |
wip
Diffstat (limited to 'fluid/widgets')
| -rw-r--r-- | fluid/widgets/App_Menu_Bar.cxx | 2 | ||||
| -rw-r--r-- | fluid/widgets/App_Menu_Bar.h | 2 | ||||
| -rw-r--r-- | fluid/widgets/Bin_Button.cxx | 4 | ||||
| -rw-r--r-- | fluid/widgets/Bin_Button.h | 4 | ||||
| -rw-r--r-- | fluid/widgets/Code_Editor.cxx | 4 | ||||
| -rw-r--r-- | fluid/widgets/Code_Editor.h | 2 | ||||
| -rw-r--r-- | fluid/widgets/Code_Viewer.h | 2 | ||||
| -rw-r--r-- | fluid/widgets/Formula_Input.cxx | 2 | ||||
| -rw-r--r-- | fluid/widgets/Formula_Input.h | 10 | ||||
| -rw-r--r-- | fluid/widgets/Node_Browser.cxx | 12 | ||||
| -rw-r--r-- | fluid/widgets/Node_Browser.h | 4 | ||||
| -rw-r--r-- | fluid/widgets/Style_Parser.h | 4 | ||||
| -rw-r--r-- | fluid/widgets/Text_Viewer.cxx | 2 | ||||
| -rw-r--r-- | fluid/widgets/Text_Viewer.h | 2 |
14 files changed, 28 insertions, 28 deletions
diff --git a/fluid/widgets/App_Menu_Bar.cxx b/fluid/widgets/App_Menu_Bar.cxx index 5dc430c69..9cb3e2d15 100644 --- a/fluid/widgets/App_Menu_Bar.cxx +++ b/fluid/widgets/App_Menu_Bar.cxx @@ -43,7 +43,7 @@ App_Menu_Bar::App_Menu_Bar(int X, int Y, int W, int H, const char *L) */ int App_Menu_Bar::handle(int event) { - Fl_Menu_Item *mi = nullptr; + Fl_Menu_Item *mi = 0; if (event == FL_BEFORE_MENU) { mi = (Fl_Menu_Item*)find_item(mergeback_cb); if (mi && Fluid.proj.write_mergeback_data) diff --git a/fluid/widgets/App_Menu_Bar.h b/fluid/widgets/App_Menu_Bar.h index 62487334f..bda77031f 100644 --- a/fluid/widgets/App_Menu_Bar.h +++ b/fluid/widgets/App_Menu_Bar.h @@ -31,7 +31,7 @@ namespace widget { */ class App_Menu_Bar : public Fl_Menu_Bar { public: - App_Menu_Bar(int X, int Y, int W, int H, const char *L = nullptr); + App_Menu_Bar(int X, int Y, int W, int H, const char *L = 0); int handle(int event) override; }; diff --git a/fluid/widgets/Bin_Button.cxx b/fluid/widgets/Bin_Button.cxx index 29afddb9c..728bcc8ed 100644 --- a/fluid/widgets/Bin_Button.cxx +++ b/fluid/widgets/Bin_Button.cxx @@ -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 = nullptr; + static Fl_Window *drag_win = 0; int ret = 0; switch (inEvent) { case FL_PUSH: @@ -107,7 +107,7 @@ int fld::widget::Bin_Window_Button::handle(int inEvent) case FL_RELEASE: if (drag_win) { Fl::delete_widget(drag_win); - drag_win = nullptr; + drag_win = 0; // create a new window here Node *prototype = typename_to_prototype((char*)user_data()); if (prototype) { diff --git a/fluid/widgets/Bin_Button.h b/fluid/widgets/Bin_Button.h index 342fe0eac..e04228c82 100644 --- a/fluid/widgets/Bin_Button.h +++ b/fluid/widgets/Bin_Button.h @@ -26,7 +26,7 @@ namespace widget { class Bin_Button : public Fl_Button { public: int handle(int) override; - Bin_Button(int X,int Y,int W,int H, const char* l = nullptr) : + Bin_Button(int X,int Y,int W,int H, const char* l = 0) : Fl_Button(X,Y,W,H,l) { } }; @@ -34,7 +34,7 @@ public: class Bin_Window_Button : public Fl_Button { public: int handle(int) override; - Bin_Window_Button(int X,int Y,int W,int H, const char* l = nullptr) : + Bin_Window_Button(int X,int Y,int W,int H, const char* l = 0) : Fl_Button(X,Y,W,H,l) { } }; diff --git a/fluid/widgets/Code_Editor.cxx b/fluid/widgets/Code_Editor.cxx index aa7c28751..583d07c5b 100644 --- a/fluid/widgets/Code_Editor.cxx +++ b/fluid/widgets/Code_Editor.cxx @@ -233,11 +233,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 = nullptr; + mStyleBuffer = 0; delete buf; buf = mBuffer; - buffer(nullptr); + buffer(0); delete buf; } diff --git a/fluid/widgets/Code_Editor.h b/fluid/widgets/Code_Editor.h index fec57727c..3ee654da1 100644 --- a/fluid/widgets/Code_Editor.h +++ b/fluid/widgets/Code_Editor.h @@ -50,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=nullptr); + Code_Editor(int X, int Y, int W, int H, const char *L=0); ~Code_Editor(); void textsize(Fl_Fontsize s); Fl_Fontsize textsize() const { return Fl_Text_Editor::textsize(); } diff --git a/fluid/widgets/Code_Viewer.h b/fluid/widgets/Code_Viewer.h index 4198fd433..976462ca1 100644 --- a/fluid/widgets/Code_Viewer.h +++ b/fluid/widgets/Code_Viewer.h @@ -37,7 +37,7 @@ namespace widget { */ class Code_Viewer : public Code_Editor { public: - Code_Viewer(int X, int Y, int W, int H, const char *L = nullptr); + Code_Viewer(int X, int Y, int W, int H, const char *L = 0); protected: void draw() override; diff --git a/fluid/widgets/Formula_Input.cxx b/fluid/widgets/Formula_Input.cxx index dadebe674..16bc2310a 100644 --- a/fluid/widgets/Formula_Input.cxx +++ b/fluid/widgets/Formula_Input.cxx @@ -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 `nullptr` + \param vars array of variables, last entry `has name_` set to `0` \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 5df30b5af..5daa22bd9 100644 --- a/fluid/widgets/Formula_Input.h +++ b/fluid/widgets/Formula_Input.h @@ -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 nullptr. +// Formula_Input_Vars with the last entry's name_ set to 0. typedef struct Formula_Input_Vars { const char *name_; Fluid_Coord_Callback *callback_; @@ -38,9 +38,9 @@ typedef struct Formula_Input_Vars { // A text input widget that understands simple math. class Formula_Input : public Fl_Input { - Fl_Callback *user_callback_ { nullptr }; - Formula_Input_Vars *vars_ { nullptr }; - void *vars_user_data_ { nullptr }; + Fl_Callback *user_callback_ { 0 }; + Formula_Input_Vars *vars_ { 0 }; + void *vars_user_data_ { 0 }; static void callback_handler_cb(Formula_Input *This, void *v); void callback_handler(void *v); @@ -49,7 +49,7 @@ class Formula_Input : public Fl_Input int eval(const char *s) const; public: - Formula_Input(int x, int y, int w, int h, const char *l = nullptr); + Formula_Input(int x, int y, int w, int h, const char *l = 0); /** Return the text in the widget text field. */ const char *text() const { return Fl_Input::value(); } diff --git a/fluid/widgets/Node_Browser.cxx b/fluid/widgets/Node_Browser.cxx index 06804125d..cf036f9b7 100644 --- a/fluid/widgets/Node_Browser.cxx +++ b/fluid/widgets/Node_Browser.cxx @@ -28,7 +28,7 @@ // ---- global variables /// Global access to the widget browser. -fld::widget::Node_Browser *widget_browser = nullptr; +fld::widget::Node_Browser *widget_browser = 0; using namespace fld; using namespace fld::widget; @@ -81,7 +81,7 @@ 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 nullptr) + is visible (may be 0) */ void redraw_widget_browser(Node *caller) { @@ -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 nullptr; // bad buffer + if (!p) return 0; // bad buffer if (!str) { // no input string if (quote) { *p++='"'; *p++='"'; } *p = 0; @@ -232,7 +232,7 @@ void *Node_Browser::item_first() const { /** 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 nullptr at the end + \return the next item, irregardless of tree depth, or 0 at the end */ void *Node_Browser::item_next(void *l) const { return ((Node*)l)->next; @@ -241,7 +241,7 @@ void *Node_Browser::item_next(void *l) const { /** 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 nullptr at the start + \return the previous item, irregardless of tree depth, or 0 at the start */ void *Node_Browser::item_prev(void *l) const { return ((Node*)l)->prev; @@ -531,7 +531,7 @@ int Node_Browser::handle(int e) { if (l) { X += 3 + 12*l->level - hposition(); if (l->can_have_children() && Fl::event_x()>X && Fl::event_x()<X+13) ; - else l = nullptr; + else l = 0; } if (l != pushedtitle) { if (pushedtitle) redraw_line(pushedtitle); diff --git a/fluid/widgets/Node_Browser.h b/fluid/widgets/Node_Browser.h index eec1e7960..1296c3108 100644 --- a/fluid/widgets/Node_Browser.h +++ b/fluid/widgets/Node_Browser.h @@ -32,7 +32,7 @@ class Node_Browser : public Fl_Browser_ ((Node_Browser *)o)->callback(); } - Node* pushedtitle { nullptr }; + Node* pushedtitle { 0 }; int saved_h_scroll_ { 0 }; int saved_v_scroll_ { 0 }; @@ -48,7 +48,7 @@ class Node_Browser : public Fl_Browser_ int incr_height() const override; public: - Node_Browser(int,int,int,int,const char * = nullptr); + Node_Browser(int,int,int,int,const char * = 0); int handle(int) override; void callback(); void save_scroll_position(); diff --git a/fluid/widgets/Style_Parser.h b/fluid/widgets/Style_Parser.h index 287ea6b21..fff38c529 100644 --- a/fluid/widgets/Style_Parser.h +++ b/fluid/widgets/Style_Parser.h @@ -24,8 +24,8 @@ namespace widget { // Class to manage style parsing, friend of Code_Editor class Style_Parser { public: - const char *tbuff { nullptr }; // text buffer - char *sbuff { nullptr }; // style buffer + const char *tbuff { 0 }; // text buffer + char *sbuff { 0 }; // style buffer int len { 0 }; // running length char style { 0 }; // current style char lwhite { 1 }; // leading white space (1=white, 0=past white) diff --git a/fluid/widgets/Text_Viewer.cxx b/fluid/widgets/Text_Viewer.cxx index 5ae821d6b..310fa6919 100644 --- a/fluid/widgets/Text_Viewer.cxx +++ b/fluid/widgets/Text_Viewer.cxx @@ -39,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(nullptr); + buffer(0); delete buf; } diff --git a/fluid/widgets/Text_Viewer.h b/fluid/widgets/Text_Viewer.h index 98fa9200f..ced32cd39 100644 --- a/fluid/widgets/Text_Viewer.h +++ b/fluid/widgets/Text_Viewer.h @@ -31,7 +31,7 @@ namespace widget { */ class Text_Viewer : public Fl_Text_Display { public: - Text_Viewer(int X, int Y, int W, int H, const char *L = nullptr); + Text_Viewer(int X, int Y, int W, int H, const char *L = 0); ~Text_Viewer(); void draw() override; |
