diff options
Diffstat (limited to 'fluid/nodes/Window_Node.cxx')
| -rw-r--r-- | fluid/nodes/Window_Node.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/fluid/nodes/Window_Node.cxx b/fluid/nodes/Window_Node.cxx index 7e90f8272..965d0e8d6 100644 --- a/fluid/nodes/Window_Node.cxx +++ b/fluid/nodes/Window_Node.cxx @@ -85,15 +85,15 @@ void i18n_type_cb(Fl_Choice *c, void *v) { Fluid.proj.set_modflag(1); } switch (Fluid.proj.i18n.type) { - case fld::I18n_Type::NONE : /* None */ + case FLD_I18N_TYPE_NONE : /* None */ i18n_gnu_group->hide(); i18n_posix_group->hide(); break; - case fld::I18n_Type::GNU : /* GNU gettext */ + case FLD_I18N_TYPE_GNU : /* GNU gettext */ i18n_gnu_group->show(); i18n_posix_group->hide(); break; - case fld::I18n_Type::POSIX : /* POSIX cat */ + case FLD_I18N_TYPE_POSIX : /* POSIX cat */ i18n_gnu_group->hide(); i18n_posix_group->show(); break; @@ -235,7 +235,7 @@ int Overlay_Window::handle(int e) { Node *Window_Node::make(Strategy strategy) { Node *anchor = Fluid.proj.tree.current, *p = anchor; if (p && (strategy.placement() == Strategy::AFTER_CURRENT)) p = p->parent; - while (p && (!p->is_code_block() || p->is_a(Type::Widget_Class))) { + while (p && (!p->is_code_block() || p->is_a(FLD_NODE_TYPE_Widget_Class))) { anchor = p; strategy.placement(Strategy::AFTER_CURRENT); p = p->parent; @@ -363,7 +363,7 @@ void Overlay_Window::resize(int X,int Y,int W,int H) { if (X!=x() || Y!=y() || W!=w() || H!=h()) { // Set a checkpoint on the first resize event, ignore further resizes until // a different type of checkpoint is triggered. - if (Fluid.proj.undo.checkpoint(fld::proj::Undo::OnceType::WINDOW_RESIZE)) + if (Fluid.proj.undo.checkpoint(fld::proj::FLD_UNDO_ONCETYPE_WINDOW_RESIZE)) Fluid.proj.set_modflag(1); } @@ -512,7 +512,7 @@ void Window_Node::draw_out_of_bounds() { draw_out_of_bounds(this, 0, 0, o->w(), o->h()); for (Node *q=next; q && q->level>level; q = q->next) { // don't do this for Fl_Scroll (which we currently can't handle in FLUID anyway) - if (q->is_a(Type::Group) && !q->is_a(Type::Scroll)) { + if (q->is_a(FLD_NODE_TYPE_Group) && !q->is_a(FLD_NODE_TYPE_Scroll)) { Widget_Node *w = (Widget_Node*)q; draw_out_of_bounds(w, w->o->x(), w->o->y(), w->o->w(), w->o->h()); } @@ -600,7 +600,7 @@ void Window_Node::draw_overlay() { newposition(myo,x,y,r,t); if (Fluid.show_guides) { // If we are in a drag operation, and the parent is a grid, show the grid overlay - if (drag && q->parent && q->parent->is_a(Type::Grid)) { + if (drag && q->parent && q->parent->is_a(FLD_NODE_TYPE_Grid)) { Fl_Grid_Proxy *grid = ((Fl_Grid_Proxy*)((Grid_Node*)q->parent)->o); grid->draw_overlay(); } @@ -614,7 +614,7 @@ void Window_Node::draw_overlay() { } else { draw_height(wgt->x()+15, wgt->y(), wgt->y()+wgt->h(), FL_ALIGN_CENTER); } - } else if (q->is_a(Type::Grid)) { + } else if (q->is_a(FLD_NODE_TYPE_Grid)) { Fl_Grid_Proxy *grid = ((Fl_Grid_Proxy*)((Grid_Node*)q)->o); grid->draw_overlay(); } @@ -675,17 +675,17 @@ void check_redraw_corresponding_parent(Node *s) { Widget_Node * prev_parent = nullptr; if( !s || !s->selected || !s->is_widget()) return; for (Node *i=s; i && i->parent; i=i->parent) { - if (i->is_a(Type::Group) && prev_parent) { - if (i->is_a(Type::Tabs)) { + if (i->is_a(FLD_NODE_TYPE_Group) && prev_parent) { + if (i->is_a(FLD_NODE_TYPE_Tabs)) { ((Fl_Tabs*)((Widget_Node*)i)->o)->value(prev_parent->o); return; } - if (i->is_a(Type::Wizard)) { + if (i->is_a(FLD_NODE_TYPE_Wizard)) { ((Fl_Wizard*)((Widget_Node*)i)->o)->value(prev_parent->o); return; } } - if (i->is_a(Type::Group) && s->is_widget()) + if (i->is_a(FLD_NODE_TYPE_Group) && s->is_widget()) prev_parent = (Widget_Node*)i; } } @@ -693,7 +693,7 @@ void check_redraw_corresponding_parent(Node *s) { // do that for every window (when selected set changes): void redraw_overlays() { for (Node *o=Fluid.proj.tree.first; o; o=o->next) - if (o->is_a(Type::Window)) ((Window_Node*)o)->fix_overlay(); + if (o->is_a(FLD_NODE_TYPE_Window)) ((Window_Node*)o)->fix_overlay(); } void toggle_overlays(Fl_Widget *,void *) { @@ -708,7 +708,7 @@ void toggle_overlays(Fl_Widget *,void *) { } for (Node *o=Fluid.proj.tree.first; o; o=o->next) - if (o->is_a(Type::Window)) { + if (o->is_a(FLD_NODE_TYPE_Window)) { Widget_Node* w = (Widget_Node*)o; ((Overlay_Window*)(w->o))->redraw_overlay(); } @@ -731,7 +731,7 @@ void toggle_guides(Fl_Widget *,void *) { guides_button->value(Fluid.show_guides); for (Node *o=Fluid.proj.tree.first; o; o=o->next) { - if (o->is_a(Type::Window)) { + if (o->is_a(FLD_NODE_TYPE_Window)) { Widget_Node* w = (Widget_Node*)o; ((Overlay_Window*)(w->o))->redraw_overlay(); } @@ -763,7 +763,7 @@ void toggle_restricted(Fl_Widget *,void *) { restricted_button->value(Fluid.show_restricted); for (Node *o=Fluid.proj.tree.first; o; o=o->next) { - if (o->is_a(Type::Window)) { + if (o->is_a(FLD_NODE_TYPE_Window)) { Widget_Node* w = (Widget_Node*)o; ((Overlay_Window*)(w->o))->redraw_overlay(); } @@ -777,7 +777,7 @@ void toggle_ghosted_outline_cb(Fl_Check_Button *,void *) { Fluid.show_ghosted_outline = !Fluid.show_ghosted_outline; Fluid.preferences.set("Fluid.show_ghosted_outline", Fluid.show_ghosted_outline); for (Node *o=Fluid.proj.tree.first; o; o=o->next) { - if (o->is_a(Type::Window)) { + if (o->is_a(FLD_NODE_TYPE_Window)) { Widget_Node* w = (Widget_Node*)o; ((Overlay_Window*)(w->o))->redraw(); } @@ -825,7 +825,7 @@ void Window_Node::moveallchildren(int key) Widget_Node* myo = (Widget_Node*)i; int x,y,r,t,ow=myo->o->w(),oh=myo->o->h(); newposition(myo,x,y,r,t); - if (myo->is_a(Type::Flex) || myo->is_a(Type::Grid)) { + if (myo->is_a(FLD_NODE_TYPE_Flex) || myo->is_a(FLD_NODE_TYPE_Grid)) { // Flex and Grid need to be able to layout their children. Fluid.proj.tree.allow_layout++; myo->o->resize(x,y,r-x,t-y); @@ -861,7 +861,7 @@ void Window_Node::moveallchildren(int key) Fluid.proj.tree.allow_layout++; f->layout(); Fluid.proj.tree.allow_layout--; - } else if (myo->parent && myo->parent->is_a(Type::Grid)) { + } else if (myo->parent && myo->parent->is_a(FLD_NODE_TYPE_Grid)) { Grid_Node* gt = (Grid_Node*)myo->parent; Fl_Grid* g = (Fl_Grid*)gt->o; if (key) { @@ -877,14 +877,14 @@ void Window_Node::moveallchildren(int key) g->layout(); Fluid.proj.tree.allow_layout--; update_widget_panel = true; - } else if (myo->parent && myo->parent->is_a(Type::Group)) { + } else if (myo->parent && myo->parent->is_a(FLD_NODE_TYPE_Group)) { Group_Node* gt = (Group_Node*)myo->parent; ((Fl_Group*)gt->o)->init_sizes(); } // move all the children, whether selected or not: Node* p; for (p = myo->next; p && p->level>myo->level; p = p->next) - if (p->is_true_widget() && !myo->is_a(Type::Flex) && !myo->is_a(Type::Grid)) { + if (p->is_true_widget() && !myo->is_a(FLD_NODE_TYPE_Flex) && !myo->is_a(FLD_NODE_TYPE_Grid)) { Widget_Node* myo2 = (Widget_Node*)p; int X,Y,R,T; newposition(myo2,X,Y,R,T); @@ -923,7 +923,7 @@ int Window_Node::handle(int event) { // find the innermost item clicked on: selection = this; for (Node* i=next; i && i->level>level; i=i->next) - if (i->is_a(Type::Group)) { + if (i->is_a(FLD_NODE_TYPE_Group)) { Widget_Node* myo = (Widget_Node*)i; if (Fl::event_inside(myo->o) && myo->o->visible_r()) { selection = myo; @@ -1075,7 +1075,7 @@ int Window_Node::handle(int event) { } else { deselect(); select(t, 1); - if (t->is_a(Type::Menu_Item)) t->open(); + if (t->is_a(FLD_NODE_TYPE_Menu_Item)) t->open(); } selection = t; drag = 0; |
