summaryrefslogtreecommitdiff
path: root/fluid/nodes/Window_Node.cxx
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 02:33:41 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 02:33:41 +0500
commit43e0a37906afabb0b3b091b8d3eac9a910cae50c (patch)
treed2a037c2bf0dc395fddb08e32ebfcf2795503b7c /fluid/nodes/Window_Node.cxx
parent4ce4967c33d56e4b56d85d11fe0e0be91e159f5d (diff)
wip
Diffstat (limited to 'fluid/nodes/Window_Node.cxx')
-rw-r--r--fluid/nodes/Window_Node.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/fluid/nodes/Window_Node.cxx b/fluid/nodes/Window_Node.cxx
index 965d0e8d6..0c3b0f01c 100644
--- a/fluid/nodes/Window_Node.cxx
+++ b/fluid/nodes/Window_Node.cxx
@@ -115,9 +115,9 @@ void show_settings_cb(Fl_Widget *, void *) {
////////////////////////////////////////////////////////////////
Fl_Menu_Item window_type_menu[] = {
- {"Single",0,nullptr,(void*)FL_WINDOW},
- {"Double",0,nullptr,(void*)(FL_DOUBLE_WINDOW)},
- {nullptr}};
+ {"Single",0,0,(void*)FL_WINDOW},
+ {"Double",0,0,(void*)(FL_DOUBLE_WINDOW)},
+ {0}};
static int overlays_invisible;
@@ -132,7 +132,7 @@ public:
Window_Node *window;
int handle(int) override;
Overlay_Window(int W,int H) : Fl_Overlay_Window(W,H) {
- Fl_Group::current(nullptr);
+ Fl_Group::current(0);
callback((Fl_Callback*)close_cb);
}
void resize(int,int,int,int) override;
@@ -201,7 +201,7 @@ uchar *Overlay_Window::read_image(int &ww, int &hh) {
draw();
// Read the screen image...
- pixels = fl_read_image(nullptr, 0, 0, ww, hh);
+ pixels = fl_read_image(0, 0, 0, ww, hh);
fl_end_offscreen();
@@ -242,12 +242,12 @@ Node *Window_Node::make(Strategy strategy) {
}
if (!p) {
fl_message("Please select a function");
- return nullptr;
+ return 0;
}
Window_Node *myo = new Window_Node();
if (!this->o) {// template widget
this->o = new Fl_Window(100,100);
- Fl_Group::current(nullptr);
+ Fl_Group::current(0);
}
myo->factory = this;
myo->drag = 0;
@@ -265,7 +265,7 @@ Node *Window_Node::make(Strategy strategy) {
void Window_Node::add_child(Node* cc, Node* before) {
if (!cc->is_widget()) return;
Widget_Node* c = (Widget_Node*)cc;
- Fl_Widget* b = before ? ((Widget_Node*)before)->o : nullptr;
+ Fl_Widget* b = before ? ((Widget_Node*)before)->o : 0;
((Fl_Window*)o)->insert(*(c->o), b);
o->redraw();
}
@@ -281,7 +281,7 @@ void Window_Node::remove_child(Node* cc) {
void Window_Node::move_child(Node* cc, Node* before) {
Widget_Node* c = (Widget_Node*)cc;
((Fl_Window*)o)->remove(c->o);
- Fl_Widget* b = before ? ((Widget_Node*)before)->o : nullptr;
+ Fl_Widget* b = before ? ((Widget_Node*)before)->o : 0;
((Fl_Window*)o)->insert(*(c->o), b);
o->redraw();
}
@@ -369,7 +369,7 @@ void Overlay_Window::resize(int X,int Y,int W,int H) {
Fl_Widget* t = resizable();
if (Fluid.proj.tree.allow_layout == 0) {
- resizable(nullptr);
+ resizable(0);
}
// do not set the mod flag if the window was not resized. In FLUID, all
@@ -401,7 +401,7 @@ void Window_Node::newdx() {
}
if (Fluid.show_guides && (drag & (FD_DRAG|FD_TOP|FD_LEFT|FD_BOTTOM|FD_RIGHT))) {
- Node *selection = nullptr; // special power for the first selected widget
+ Node *selection = 0; // special power for the first selected widget
for (Node *q=next; q && q->level>level; q = q->next) {
if (q->selected && q->is_true_widget()) {
selection = q;
@@ -591,7 +591,7 @@ void Window_Node::draw_overlay() {
int mybx,myby,mybr,mybt;
int mysx,mysy,mysr,myst;
mybx = mysx = o->w(); myby = mysy = o->h(); mybr = mysr = 0; mybt = myst = 0;
- Node *selection = nullptr; // special power for the first selected widget
+ Node *selection = 0; // special power for the first selected widget
for (Node *q=next; q && q->level>level; q = q->next)
if (q->selected && q->is_true_widget()) {
if (!selection) selection = q;
@@ -672,7 +672,7 @@ void Window_Node::fix_overlay() {
// check if we must redraw any parent of tabs/wizard type
void check_redraw_corresponding_parent(Node *s) {
- Widget_Node * prev_parent = nullptr;
+ Widget_Node * prev_parent = 0;
if( !s || !s->selected || !s->is_widget()) return;
for (Node *i=s; i && i->parent; i=i->parent) {
if (i->is_a(FLD_NODE_TYPE_Group) && prev_parent) {
@@ -743,7 +743,7 @@ void toggle_guides(Fl_Widget *,void *) {
This is called from the check button in the Settings dialog.
*/
void toggle_guides_cb(Fl_Check_Button *o, void *v) {
- toggle_guides(nullptr, nullptr);
+ toggle_guides(0, 0);
}
/**
@@ -789,7 +789,7 @@ void toggle_ghosted_outline_cb(Fl_Check_Button *,void *) {
This is called from the check button in the Settings dialog.
*/
void toggle_restricted_cb(Fl_Check_Button *o, void *v) {
- toggle_restricted(nullptr, nullptr);
+ toggle_restricted(0, 0);
}
extern void select(Node *,int);
@@ -913,7 +913,7 @@ int Window_Node::popupx = 0x7FFFFFFF; // mark as invalid (MAXINT)
int Window_Node::popupy = 0x7FFFFFFF;
int Window_Node::handle(int event) {
- static Node* selection = nullptr;
+ static Node* selection = 0;
switch (event) {
case FL_DND_ENTER:
// printf("DND enter\n");
@@ -945,11 +945,11 @@ int Window_Node::handle(int event) {
case FL_PASTE:
// printf("DND paste\n");
{ Node *prototype = typename_to_prototype(Fl::event_text());
- if (prototype==nullptr) {
+ if (prototype==0) {
// it's not a FLUID type, so it could be the filename of an image
const char *cfn = Fl::event_text();
// printf("DND is filename %s?\n", cfn);
- if ((cfn == nullptr) || (*cfn == 0)) return 0;
+ if ((cfn == 0) || (*cfn == 0)) return 0;
if (strlen(cfn) >= FL_PATH_MAX) return 0;
char fn[FL_PATH_MAX+1];
// some platform prepend "file://" or "computer://" or similar text
@@ -973,7 +973,7 @@ int Window_Node::handle(int event) {
if (!img || (img->ld() < 0)) return 0;
// ok, so it is an image - now add it as image() or deimage() to the widget
// printf("DND check for target %s\n", fn);
- Widget_Node *tgt = nullptr;
+ Widget_Node *tgt = 0;
for (Node* i=next; i && i->level>level; i=i->next) {
if (i->is_widget()) {
Widget_Node* myo = (Widget_Node*)i;
@@ -1022,7 +1022,7 @@ int Window_Node::handle(int event) {
}
popupx = 0x7FFFFFFF;
popupy = 0x7FFFFFFF; // mark as invalid (MAXINT)
- in_this_only = nullptr;
+ in_this_only = 0;
widget_browser->display(Fluid.proj.tree.current);
widget_browser->rebuild();
return 1;
@@ -1039,7 +1039,7 @@ int Window_Node::handle(int event) {
const Fl_Menu_Item* m = New_Menu->popup(mx,my,"New",myprev);
if (m && m->callback()) {myprev = m; m->do_callback(this->o);}
popupx = 0x7FFFFFFF; popupy = 0x7FFFFFFF; // mark as invalid (MAXINT)
- in_this_only = nullptr;
+ in_this_only = 0;
return 1;
}
// find the innermost item clicked on:
@@ -1178,7 +1178,7 @@ int Window_Node::handle(int event) {
return 1;
case 'o':
- toggle_overlays(nullptr, nullptr);
+ toggle_overlays(0, 0);
break;
default:
@@ -1189,8 +1189,8 @@ int Window_Node::handle(int event) {
in_this_only = this; // modifies how some menu items work.
const Fl_Menu_Item* m = Fluid.main_menu->test_shortcut();
if (m && m->callback()) m->do_callback(this->o);
- in_this_only = nullptr;
- return (m != nullptr);}
+ in_this_only = 0;
+ return (m != 0);}
default:
return 0;
@@ -1310,7 +1310,7 @@ int Window_Node::read_fdesign(const char* propname, const char* value) {
Widget_Class_Node Widget_Class_Node::prototype;
-Widget_Class_Node *current_widget_class = nullptr;
+Widget_Class_Node *current_widget_class = 0;
/**
Create and add a new Widget Class node.
@@ -1330,7 +1330,7 @@ Node *Widget_Class_Node::make(Strategy strategy) {
if (!this->o) {// template widget
this->o = new Fl_Window(100,100);
- Fl_Group::current(nullptr);
+ Fl_Group::current(0);
}
myo->factory = this;
myo->drag = 0;
@@ -1369,7 +1369,7 @@ void Widget_Class_Node::read_property(fld::io::Project_Reader &f, const char *c)
// This is useful for classes that contain a namespace component
static const char *trimclassname(const char *n) {
if (!n)
- return nullptr;
+ return 0;
const char *nn;
while((nn = strstr(n, "::"))) {
n = nn + 2;