diff options
Diffstat (limited to 'fluid/nodes/Grid_Node.cxx')
| -rw-r--r-- | fluid/nodes/Grid_Node.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fluid/nodes/Grid_Node.cxx b/fluid/nodes/Grid_Node.cxx index 2304a7a10..d38bbd1ca 100644 --- a/fluid/nodes/Grid_Node.cxx +++ b/fluid/nodes/Grid_Node.cxx @@ -51,7 +51,7 @@ */ Fl_Grid_Proxy::Fl_Grid_Proxy(int X,int Y,int W,int H) : Fl_Grid(X,Y,W,H), - transient_(nullptr), + transient_(0), num_transient_(0), cap_transient_(0) { @@ -137,19 +137,19 @@ void Fl_Grid_Proxy::move_cell(Fl_Widget *in_child, int to_row, int to_col, int h } if ((to_row < 0) || (to_row+rowspan > rows())) return; if ((to_col < 0) || (to_col+colspan > cols())) return; - Fl_Grid::Cell *new_cell = nullptr; + Fl_Grid::Cell *new_cell = 0; if (how == 0) { // replace old occupant in cell, making that one homeless new_cell = widget(in_child, to_row, to_col, rowspan, colspan, align); } else if (how == 1) { // don't replace an old occupant, making ourselves homeless // todo: colspan, rowspan? - if (cell(to_row, to_col) == nullptr) { + if (cell(to_row, to_col) == 0) { new_cell = widget(in_child, to_row, to_col, rowspan, colspan, align); } else { if (old_cell) remove_cell(old_cell->row(), old_cell->col()); } } else if (how == 2) { Cell *current = cell(to_row, to_col); - if (current == nullptr) { + if (current == 0) { new_cell = widget(in_child, to_row, to_col, rowspan, colspan, align); } else { if (old_cell) remove_cell(old_cell->row(), old_cell->col()); @@ -240,7 +240,7 @@ void Fl_Grid_Proxy::transient_remove_(Fl_Widget *w) { /** Find a cell in the grid or in the transient cell list. \param[in] widget must be a child of the grid. - \return the cell, the transient cell, or nullptr if neither was found. + \return the cell, the transient cell, or 0 if neither was found. */ Fl_Grid_Proxy::Cell *Fl_Grid_Proxy::any_cell(Fl_Widget *widget) const { Cell *c = cell(widget); @@ -251,14 +251,14 @@ Fl_Grid_Proxy::Cell *Fl_Grid_Proxy::any_cell(Fl_Widget *widget) const { /** Find a cell in the transient cell list. \param[in] widget must be a child of the grid. - \return the transient cell, or nullptr if it was not found. + \return the transient cell, or 0 if it was not found. */ Fl_Grid_Proxy::Cell *Fl_Grid_Proxy::transient_cell(Fl_Widget *widget) const { for (int i=0; i<num_transient_; i++) { if (transient_[i].widget == widget) return transient_[i].cell; } - return nullptr; + return 0; } /** @@ -292,7 +292,7 @@ Grid_Node::Grid_Node() { Fl_Widget *Grid_Node::widget(int X,int Y,int W,int H) { Fl_Grid *g = new Fl_Grid_Proxy(X,Y,W,H); g->layout(3, 3); - Fl_Group::current(nullptr); + Fl_Group::current(0); return g; } @@ -678,7 +678,7 @@ void Grid_Node::child_resized(Widget_Node *child_type) { Fl_Grid *Grid_Node::selected() { if (current_widget && current_widget->is_a(FLD_NODE_TYPE_Grid)) return ((Fl_Grid*)((Grid_Node*)current_widget)->o); - return nullptr; + return 0; } /** @@ -689,7 +689,7 @@ Fl_Grid *Grid_Node::selected() { void Grid_Node::insert_child_at(Fl_Widget *child, int x, int y) { Fl_Grid_Proxy *grid = (Fl_Grid_Proxy*)o; int row = -1, col = -1, ml, mt, grg, gcg; - grid->margin(&ml, &mt, nullptr, nullptr); + grid->margin(&ml, &mt, 0, 0); grid->gap(&grg, &gcg); int x0 = grid->x() + Fl::box_dx(grid->box()) + ml; int y0 = grid->y() + Fl::box_dy(grid->box()) + mt; |
