diff options
Diffstat (limited to 'fluid/app/Snap_Action.cxx')
| -rw-r--r-- | fluid/app/Snap_Action.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/fluid/app/Snap_Action.cxx b/fluid/app/Snap_Action.cxx index 08e9bf1e5..2ec7affad 100644 --- a/fluid/app/Snap_Action.cxx +++ b/fluid/app/Snap_Action.cxx @@ -105,8 +105,8 @@ static Layout_Preset grid_tool = { Layout_Preset *fld::app::default_layout_preset = &fltk_app; static Layout_Suite static_suite_list[] = { - { (char*)"FLTK", (char*)"@fd_beaker FLTK", { &fltk_app, &fltk_dlg, &fltk_tool }, fld::Tool_Store::INTERNAL }, - { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &grid_dlg, &grid_tool }, fld::Tool_Store::INTERNAL } + { (char*)"FLTK", (char*)"@fd_beaker FLTK", { &fltk_app, &fltk_dlg, &fltk_tool }, FLD_TOOL_STORE_INTERNAL }, + { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &grid_dlg, &grid_tool }, FLD_TOOL_STORE_INTERNAL } }; Fl_Menu_Item main_layout_submenu_[] = { @@ -403,10 +403,10 @@ void Layout_Suite::read(fld::io::Project_Reader *in) { void Layout_Suite::update_label() { std::string sym; switch (storage_) { - case fld::Tool_Store::INTERNAL: sym.assign("@fd_beaker "); break; - case fld::Tool_Store::USER: sym.assign("@fd_user "); break; - case fld::Tool_Store::PROJECT: sym.assign("@fd_project "); break; - case fld::Tool_Store::FILE: sym.assign("@fd_file "); break; + case FLD_TOOL_STORE_INTERNAL: sym.assign("@fd_beaker "); break; + case FLD_TOOL_STORE_USER: sym.assign("@fd_user "); break; + case FLD_TOOL_STORE_PROJECT: sym.assign("@fd_project "); break; + case FLD_TOOL_STORE_FILE: sym.assign("@fd_file "); break; } sym.append(name_); if (menu_label) @@ -436,14 +436,14 @@ void Layout_Suite::init() { name_ = nullptr; menu_label = nullptr; layout[0] = layout[1] = layout[2] = nullptr; - storage_ = fld::Tool_Store::INTERNAL; + storage_ = FLD_TOOL_STORE_INTERNAL; } /** Free all allocated resources. */ Layout_Suite::~Layout_Suite() { - if (storage_ == fld::Tool_Store::INTERNAL) return; + if (storage_ == FLD_TOOL_STORE_INTERNAL) return; if (name_) ::free(name_); for (int i = 0; i < 3; ++i) { delete layout[i]; @@ -619,7 +619,7 @@ Layout_List::~Layout_List() { ::free(choice_menu_); for (int i = 0; i < list_size_; i++) { Layout_Suite &suite = list_[i]; - if (suite.storage_ != fld::Tool_Store::INTERNAL) + if (suite.storage_ != FLD_TOOL_STORE_INTERNAL) suite.~Layout_Suite(); } ::free(list_); @@ -664,9 +664,9 @@ void Layout_List::update_menu_labels() { Load all user layouts from the FLUID user preferences. */ int Layout_List::load(const std::string &filename) { - remove_all(fld::Tool_Store::FILE); + remove_all(FLD_TOOL_STORE_FILE); Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", nullptr, Fl_Preferences::C_LOCALE); - read(prefs, fld::Tool_Store::FILE); + read(prefs, FLD_TOOL_STORE_FILE); return 0; } @@ -677,7 +677,7 @@ int Layout_List::save(const std::string &filename) { assert(this); Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", nullptr, (Fl_Preferences::Root)(Fl_Preferences::C_LOCALE|Fl_Preferences::CLEAR)); prefs.clear(); - write(prefs, fld::Tool_Store::FILE); + write(prefs, FLD_TOOL_STORE_FILE); return 0; } @@ -736,7 +736,7 @@ void Layout_List::write(fld::io::Project_Writer *out) { if ((current_suite()==0) && (current_preset()==0)) { int nSuite = 0; for (int i=0; i<list_size_; i++) { - if (list_[i].storage_ == fld::Tool_Store::PROJECT) nSuite++; + if (list_[i].storage_ == FLD_TOOL_STORE_PROJECT) nSuite++; } if (nSuite == 0) return; } @@ -745,7 +745,7 @@ void Layout_List::write(fld::io::Project_Writer *out) { out->write_string(" current_preset %d\n", current_preset()); for (int i=0; i<list_size_; i++) { Layout_Suite &suite = list_[i]; - if (suite.storage_ == fld::Tool_Store::PROJECT) + if (suite.storage_ == FLD_TOOL_STORE_PROJECT) suite.write(out); } out->write_string("}"); @@ -772,7 +772,7 @@ void Layout_List::read(fld::io::Project_Reader *in) { } else if (!strcmp(key, "suite")) { int n = add(in->filename_name()); list_[n].read(in); - list_[n].storage(fld::Tool_Store::PROJECT); + list_[n].storage(FLD_TOOL_STORE_PROJECT); } else if (!strcmp(key, "}")) { break; } else { @@ -878,8 +878,8 @@ int Layout_List::add(const char *name) { ::memcpy(new_suite.layout[i], old_suite.layout[i], sizeof(Layout_Preset)); } fld::Tool_Store new_storage = old_suite.storage_; - if (new_storage == fld::Tool_Store::INTERNAL) - new_storage = fld::Tool_Store::USER; + if (new_storage == FLD_TOOL_STORE_INTERNAL) + new_storage = FLD_TOOL_STORE_USER; new_suite.storage(new_storage); main_menu_[n].label(new_suite.menu_label); main_menu_[n].callback(main_menu_[0].callback()); @@ -920,7 +920,7 @@ void Layout_List::remove(int ix) { /** Remove all Suites that use the given storage attribute. - \param[in] storage storage attribute, see fld::Tool_Store::INTERNAL, etc. + \param[in] storage storage attribute, see FLD_TOOL_STORE_INTERNAL, etc. */ void Layout_List::remove_all(fld::Tool_Store storage) { for (int i=list_size_-1; i>=0; --i) { @@ -953,11 +953,11 @@ static bool in_window(Snap_Data &d) { } static bool in_group(Snap_Data &d) { - return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(Type::Group) && d.wgt->parent != d.win); + return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(FLD_NODE_TYPE_Group) && d.wgt->parent != d.win); } static bool in_tabs(Snap_Data &d) { - return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(Type::Tabs)); + return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(FLD_NODE_TYPE_Tabs)); } static Fl_Group *parent(Snap_Data &d) { @@ -1473,7 +1473,7 @@ public: clr(); best_match = nullptr; if (!d.wgt) return; - if (!d.wgt->parent->is_a(Type::Group)) return; + if (!d.wgt->parent->is_a(FLD_NODE_TYPE_Group)) return; int dsib_min = 1024; Group_Node *gt = (Group_Node*)d.wgt->parent; Fl_Group *g = (Fl_Group*)gt->o; |
