diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..752471856 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,31 @@ +# +# Experimental FLTK clang-tidy file. This is not an officiel clang-tidy test yet. +# + +Checks: + - '-*' + - 'bugprone-*' + - '-bugprone-narrowing-conversions' + - 'cert-*' + - '-cert-err58-cpp' + - 'clang-analyzer-*' + - 'cppcoreguidelines-*' + - '-cppcoreguidelines-narrowing-conversions' + # Disabled: intentional FLTK design decisions, not defects + - '-cppcoreguidelines-avoid-c-arrays' # string buffers, image data + - '-cppcoreguidelines-avoid-magic-numbers' # RGB values, widget sizes, etc. + - '-cppcoreguidelines-avoid-non-const-global-variables' # Fl::first_window() etc. + - '-cppcoreguidelines-macro-to-enum' # FL_RED/FL_BLUE style constants + - '-cppcoreguidelines-macro-usage' # FL_EXPORT, FL_OVERRIDE, etc. + - '-cppcoreguidelines-non-private-member-variables-in-classes' + - '-cppcoreguidelines-owning-memory' # requires GSL; fires on all new/delete + - '-cppcoreguidelines-pro-bounds-array-to-pointer-decay' + - '-cppcoreguidelines-pro-bounds-pointer-arithmetic' # image/buffer manipulation + - '-cppcoreguidelines-pro-type-reinterpret-cast' # OS handle idiom (Fl_X, etc.) + - '-cppcoreguidelines-pro-type-vararg' # printf, fl_message, etc. + - '-cppcoreguidelines-special-member-functions' # would require Rule-of-5 everywhere + - '-cppcoreguidelines-use-enum-class' # Fl_Color/Fl_Font are public API + +# Report warnings only in FLTK's own headers; suppress noise from bundled +# third-party libraries (jpeg, png, zlib, nanosvg, libdecor). +HeaderFilterRegex: '.*/fltk-1\.5\.git/(FL|src|fluid|fltk-options|test|util|public)/.*' diff --git a/fluid/.clang-tidy b/fluid/.clang-tidy new file mode 100644 index 000000000..258255f40 --- /dev/null +++ b/fluid/.clang-tidy @@ -0,0 +1,75 @@ +# +# Experimental FLTK clang-tidy file. This is not an officiel clang-tidy test yet. +# + +# Fluid-specific clang-tidy configuration. +# Inherits bugprone-*, cert-*, clang-analyzer-*, cppcoreguidelines-* from the root .clang-tidy. +# All modernize-* checks are restricted to C++11-compatible suggestions. +# C++14+ checks (make-unique, transparent-functors, nodiscard, concat-nested-namespaces) are omitted. + +InheritParentConfig: true + +Checks: + # --- C++11 modernization --- + - 'modernize-avoid-bind' + - 'modernize-deprecated-headers' + - 'modernize-loop-convert' + - 'modernize-make-shared' + - 'modernize-pass-by-value' + - 'modernize-redundant-void-arg' + - 'modernize-replace-auto-ptr' + - 'modernize-return-braced-init-list' + - 'modernize-shrink-to-fit' + - 'modernize-use-auto' + - 'modernize-use-bool-literals' + - 'modernize-use-default-member-init' + - 'modernize-use-emplace' + - 'modernize-use-equals-default' + - 'modernize-use-equals-delete' + - 'modernize-use-noexcept' + - 'modernize-use-nullptr' + - 'modernize-use-override' + - 'modernize-use-using' + # --- Readability / refactoring --- + - 'readability-avoid-const-params-in-decls' + - 'readability-braces-around-statements' + - 'readability-const-return-type' + - 'readability-container-size-empty' + - 'readability-else-after-return' + - 'readability-inconsistent-declaration-parameter-name' + - 'readability-make-member-function-const' + - 'readability-misleading-indentation' + - 'readability-qualified-auto' + - 'readability-redundant-access-specifiers' + - 'readability-redundant-control-flow' + - 'readability-redundant-member-init' + - 'readability-redundant-smartptr-get' + - 'readability-redundant-string-cstr' + - 'readability-redundant-string-init' + - 'readability-simplify-boolean-expr' + - 'readability-static-accessed-through-instance' + - 'readability-string-compare' + - 'readability-uniqueptr-delete-release' + # --- Performance --- + - 'performance-for-range-copy' + - 'performance-implicit-conversion-in-loop' + - 'performance-inefficient-string-concatenation' + - 'performance-move-constructor-init' + - 'performance-unnecessary-copy-initialization' + - 'performance-unnecessary-value-param' + +CheckOptions: + # Only suggest auto when the original type name is long enough to make auto a win + - key: modernize-use-auto.MinTypeNameLength + value: '5' + # Accept range-for when the loop is clearly safe to transform + - key: modernize-loop-convert.MinConfidence + value: 'reasonable' + # Pointer and integer conditions are idiomatic in FLTK / C-adjacent code + - key: readability-implicit-bool-conversion.AllowIntegerConditions + value: '1' + - key: readability-implicit-bool-conversion.AllowPointerConditions + value: '1' + +# Warn on Fluid headers only; suppress noise from FLTK and system headers +HeaderFilterRegex: '.*/fluid/.*' diff --git a/fluid/Fluid.cxx b/fluid/Fluid.cxx index 899e02f87..9a5ef913e 100644 --- a/fluid/Fluid.cxx +++ b/fluid/Fluid.cxx @@ -55,9 +55,9 @@ #include "../src/flstring.h" -fld::Application Fluid; +fluid::Application Fluid; -using namespace fld; +using namespace fluid; /** @@ -167,11 +167,11 @@ int Application::run(int argc,char **argv) { make_fluid_icon(main_window); // assign icon to main window position_window(main_window,"main_window_pos", 1, 10, 30, WINWIDTH, WINHEIGHT ); if (g_shell_config) { - g_shell_config->read(preferences, fld::Tool_Store::USER); + g_shell_config->read(preferences, fluid::Tool_Store::USER); g_shell_config->update_settings_dialog(); g_shell_config->rebuild_shell_menu(); } - Fluid.layout_list.read(preferences, fld::Tool_Store::USER); + Fluid.layout_list.read(preferences, fluid::Tool_Store::USER); main_window->show(argc,argv); toggle_widget_bin(); if (!c && openlast_button->value() && history.abspath[0][0] && args.autodoc_path.empty()) { @@ -181,7 +181,7 @@ int Application::run(int argc,char **argv) { toggle_codeview_cb(nullptr,nullptr); } proj.undo.suspend(); - if (c && !fld::io::read_file(proj, c,0)) { + if (c && !fluid::io::read_file(proj, c,0)) { if (batch_mode) { fprintf(stderr,"%s : %s\n", c, strerror(errno)); exit(1); @@ -204,7 +204,7 @@ int Application::run(int argc,char **argv) { } if (args.update_file) { // fluid -u - fld::io::write_file(proj, c, 0); + fluid::io::write_file(proj, c, 0); if (!args.compile_file) exit(0); } @@ -294,8 +294,8 @@ void Application::quit() { delete help_dialog; if (g_shell_config) - g_shell_config->write(preferences, fld::Tool_Store::USER); - Fluid.layout_list.write(preferences, fld::Tool_Store::USER); + g_shell_config->write(preferences, fluid::Tool_Store::USER); + Fluid.layout_list.write(preferences, fluid::Tool_Store::USER); proj.undo.clear(); @@ -545,7 +545,7 @@ bool Application::merge_project_file(const std::string &filename_arg) { proj.set_filename(c); if (is_a_merge) proj.undo.checkpoint(); proj.undo.suspend(); - if (!fld::io::read_file(proj, c, is_a_merge)) { + if (!fluid::io::read_file(proj, c, is_a_merge)) { proj.undo.resume(); widget_browser->rebuild(); proj.update_settings_dialog(); @@ -611,7 +611,7 @@ void Application::save_project_file(void *v) { #endif if (v != (void *)2) proj.set_filename(c); } - if (!fld::io::write_file(proj, c)) { + if (!fluid::io::write_file(proj, c)) { fl_alert("Error writing %s: %s", c, strerror(errno)); return; } @@ -633,7 +633,7 @@ void Application::revert_project() { "Cancel", "Revert", nullptr)) return; } proj.undo.suspend(); - if (!fld::io::read_file(proj, proj.proj_filename, 0)) { + if (!fluid::io::read_file(proj, proj.proj_filename, 0)) { proj.undo.resume(); widget_browser->rebuild(); proj.update_settings_dialog(); @@ -738,13 +738,13 @@ bool Application::new_project_from_template() { fclose(outfile); proj.undo.suspend(); - fld::io::read_file(proj, cutfname(1), 0); + fluid::io::read_file(proj, cutfname(1), 0); fl_unlink(cutfname(1)); proj.undo.resume(); } else { // No instance name, so read the template without replacements... proj.undo.suspend(); - fld::io::read_file(proj, tname, 0); + fluid::io::read_file(proj, tname, 0); proj.undo.resume(); } } @@ -853,7 +853,7 @@ int Application::write_code_files(bool dont_show_completion_dialog) } // -- generate the file names with absolute paths - fld::io::Code_Writer f(proj); + fluid::io::Code_Writer f(proj); std::string code_filename = proj.codefile_path() + proj.codefile_name(); std::string header_filename = proj.headerfile_path() + proj.headerfile_name(); @@ -901,7 +901,7 @@ void Application::cut_selected() { return; } flush_text_widgets(); - if (!fld::io::write_file(proj, cutfname(),1)) { + if (!fluid::io::write_file(proj, cutfname(),1)) { fl_message("Can't write %s: %s", cutfname(), strerror(errno)); return; } @@ -927,7 +927,7 @@ void Application::copy_selected() { } flush_text_widgets(); ipasteoffset = 10; - if (!fld::io::write_file(proj, cutfname(),1)) { + if (!fluid::io::write_file(proj, cutfname(),1)) { fl_message("Can't write %s: %s", cutfname(), strerror(errno)); return; } @@ -955,7 +955,7 @@ void Application::paste_from_clipboard() { //strategy = Strategy::FROM_FILE_AS_FIRST_CHILD; } } - if (!fld::io::read_file(proj, cutfname(), 1, strategy)) { + if (!fluid::io::read_file(proj, cutfname(), 1, strategy)) { widget_browser->rebuild(); fl_message("Can't read %s: %s", cutfname(), strerror(errno)); } @@ -998,7 +998,7 @@ void Application::duplicate_selected() { proj.tree.current = new_insert; // write the selected widgets to a file: - if (!fld::io::write_file(proj, cutfname(1),1)) { + if (!fluid::io::write_file(proj, cutfname(1),1)) { fl_message("Can't write %s: %s", cutfname(1), strerror(errno)); return; } @@ -1007,7 +1007,7 @@ void Application::duplicate_selected() { pasteoffset = 0; proj.undo.checkpoint(); proj.undo.suspend(); - if (!fld::io::read_file(proj, cutfname(1), 1, Strategy::FROM_FILE_AFTER_CURRENT)) { + if (!fluid::io::read_file(proj, cutfname(1), 1, Strategy::FROM_FILE_AFTER_CURRENT)) { fl_message("Can't read %s: %s", cutfname(1), strerror(errno)); } fl_unlink(cutfname(1)); @@ -1184,7 +1184,7 @@ void Application::make_main_window() { o->box(FL_FLAT_BOX); o->tooltip("Double-click to view or change an item."); main_window->resizable(o); - main_menubar = new fld::widget::App_Menu_Bar(0,0,BROWSERWIDTH,MENUHEIGHT); + main_menubar = new fluid::widget::App_Menu_Bar(0,0,BROWSERWIDTH,MENUHEIGHT); main_menubar->menu(main_menu); // quick access to all dynamic menu items save_item = (Fl_Menu_Item*)main_menubar->find_item(menu_file_save_cb); diff --git a/fluid/Fluid.h b/fluid/Fluid.h index 919e76352..d0d6f6f37 100644 --- a/fluid/Fluid.h +++ b/fluid/Fluid.h @@ -46,7 +46,7 @@ class Fl_Button; class Fl_Check_Button; class Fl_Help_Dialog; -namespace fld { +namespace fluid { namespace app { class Layout_List; } @@ -120,7 +120,7 @@ public: // Member Variables // TODO: make this into a class: app::GUI Fl_Window *main_window { nullptr }; static Fl_Menu_Item main_menu[]; - fld::widget::App_Menu_Bar *main_menubar { nullptr }; + fluid::widget::App_Menu_Bar *main_menubar { nullptr }; Fl_Menu_Item *save_item { nullptr }; Fl_Menu_Item *history_item { nullptr }; Fl_Menu_Item *widgetbin_item { nullptr }; @@ -213,9 +213,9 @@ public: // Methods #endif // __APPLE__ }; -} // namespace fld +} // namespace fluid -extern fld::Application Fluid; +extern fluid::Application Fluid; #endif // FLUID_FLUID_H diff --git a/fluid/Project.cxx b/fluid/Project.cxx index e2599e3e6..c6e2a1ce9 100644 --- a/fluid/Project.cxx +++ b/fluid/Project.cxx @@ -22,7 +22,7 @@ #include "panels/settings_panel.h" #include "panels/codeview_panel.h" -using namespace fld; +using namespace fluid; // ---- project settings @@ -167,8 +167,8 @@ std::string Project::stringsfile_name() const { if (!proj_filename) return std::string{}; switch (i18n.type) { default: return fl_filename_setext_str(fl_filename_name(proj_filename), ".txt"); - case fld::I18n_Type::GNU: return fl_filename_setext_str(fl_filename_name(proj_filename), ".po"); - case fld::I18n_Type::POSIX: return fl_filename_setext_str(fl_filename_name(proj_filename), ".msg"); + case fluid::I18n_Type::GNU: return fl_filename_setext_str(fl_filename_name(proj_filename), ".po"); + case fluid::I18n_Type::POSIX: return fl_filename_setext_str(fl_filename_name(proj_filename), ".msg"); } } @@ -274,7 +274,7 @@ void Project::write_strings() { if (!proj_filename) return; } std::string filename = stringsfile_path() + stringsfile_name(); - int x = fld::io::write_strings(*this, filename); + int x = fluid::io::write_strings(*this, filename); if (Fluid.batch_mode) { if (x) { fprintf(stderr, "%s : %s\n", filename.c_str(), strerror(errno)); diff --git a/fluid/Project.h b/fluid/Project.h index bb8110f19..8c95bff44 100644 --- a/fluid/Project.h +++ b/fluid/Project.h @@ -28,7 +28,7 @@ // ---- project class declaration -namespace fld { +namespace fluid { namespace app { class Layout_Preset; @@ -117,7 +117,7 @@ public: // Methods void set_modflag(int mf, int mfc = -1); }; -} // namespace fld +} // namespace fluid #endif // FLUID_PROJECT_H diff --git a/fluid/app/Menu.cxx b/fluid/app/Menu.cxx index ab03a822d..4f70a2702 100644 --- a/fluid/app/Menu.cxx +++ b/fluid/app/Menu.cxx @@ -35,7 +35,7 @@ extern void layout_suite_marker(Fl_Widget *, void *user_data); extern void select_layout_preset_cb(Fl_Widget *, void *user_data); extern Fl_Menu_Item main_layout_submenu_[]; -using namespace fld; +using namespace fluid; void write_cb(Fl_Widget *, void *) { @@ -52,7 +52,7 @@ void about_cb(Fl_Widget *, void *) { Fluid.about(); } void help_cb(Fl_Widget *, void *) { Fluid.show_help("fluid.html"); } -static void save_template_cb(Fl_Widget *, void *) { fld::app::save_template(); } +static void save_template_cb(Fl_Widget *, void *) { fluid::app::save_template(); } void mergeback_cb(Fl_Widget *, void *); void manual_cb(Fl_Widget *, void *) { @@ -116,8 +116,8 @@ Fl_Menu_Item Application::main_menu[] = { {"&Quit", FL_COMMAND+'q', exit_cb}, {nullptr}, {"&Edit",0,nullptr,nullptr,FL_SUBMENU}, - {"&Undo", FL_COMMAND+'z', fld::proj::Undo::undo_cb}, - {"&Redo", FL_COMMAND+FL_SHIFT+'z', fld::proj::Undo::redo_cb, nullptr, FL_MENU_DIVIDER}, + {"&Undo", FL_COMMAND+'z', fluid::proj::Undo::undo_cb}, + {"&Redo", FL_COMMAND+FL_SHIFT+'z', fluid::proj::Undo::redo_cb, nullptr, FL_MENU_DIVIDER}, {"C&ut", FL_COMMAND+'x', cut_cb}, {"&Copy", FL_COMMAND+'c', copy_cb}, {"&Paste", FL_COMMAND+'v', paste_cb}, diff --git a/fluid/app/Snap_Action.cxx b/fluid/app/Snap_Action.cxx index 0de72919e..60257f3a0 100644 --- a/fluid/app/Snap_Action.cxx +++ b/fluid/app/Snap_Action.cxx @@ -34,8 +34,8 @@ #undef max #include -using namespace fld; -using namespace fld::app; +using namespace fluid; +using namespace fluid::app; // TODO: warning if the user wants to change builtin layouts // TODO: move panel to global settings panel (move load & save to main pulldown, or to toolbox?) @@ -98,11 +98,11 @@ static Layout_Preset grid_tool = { 0, 10, -1, 10 // labelfont/size, textfont/size }; -Layout_Preset *fld::app::default_layout_preset = &fltk_app; +Layout_Preset *fluid::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 }, fluid::Tool_Store::INTERNAL }, + { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &grid_dlg, &grid_tool }, fluid::Tool_Store::INTERNAL } }; Fl_Menu_Item main_layout_submenu_[] = { @@ -237,7 +237,7 @@ void Layout_Preset::read(Fl_Preferences &prefs) { /** Write presets to an .fl project file. */ -void Layout_Preset::write(fld::io::Project_Writer *out) { +void Layout_Preset::write(fluid::io::Project_Writer *out) { out->write_string(" preset { 1\n"); // preset format version out->write_string(" %d %d %d %d %d %d\n", left_window_margin, right_window_margin, @@ -259,7 +259,7 @@ void Layout_Preset::write(fld::io::Project_Writer *out) { /** Read presets from an .fl project file. */ -void Layout_Preset::read(fld::io::Project_Reader *in) { +void Layout_Preset::read(fluid::io::Project_Reader *in) { const char *key; key = in->read_word(1); if (key && !strcmp(key, "{")) { @@ -356,7 +356,7 @@ void Layout_Suite::read(Fl_Preferences &prefs) { /** Write a presets suite to an .fl project file. */ -void Layout_Suite::write(fld::io::Project_Writer *out) { +void Layout_Suite::write(fluid::io::Project_Writer *out) { out->write_string(" suite {\n"); out->write_string(" name "); out->write_word(name_); out->write_string("\n"); for (int i = 0; i < 3; ++i) { @@ -368,7 +368,7 @@ void Layout_Suite::write(fld::io::Project_Writer *out) { /** Read a presets suite from an .fl project file. */ -void Layout_Suite::read(fld::io::Project_Reader *in) { +void Layout_Suite::read(fluid::io::Project_Reader *in) { const char *key; key = in->read_word(1); if (key && !strcmp(key, "{")) { @@ -399,10 +399,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 fluid::Tool_Store::INTERNAL: sym.assign("@fd_beaker "); break; + case fluid::Tool_Store::USER: sym.assign("@fd_user "); break; + case fluid::Tool_Store::PROJECT: sym.assign("@fd_project "); break; + case fluid::Tool_Store::FILE: sym.assign("@fd_file "); break; } sym.append(name_); if (menu_label) @@ -432,14 +432,14 @@ void Layout_Suite::init() { name_ = nullptr; menu_label = nullptr; layout[0] = layout[1] = layout[2] = nullptr; - storage_ = fld::Tool_Store::INTERNAL; + storage_ = fluid::Tool_Store::INTERNAL; } /** Free all allocated resources. */ Layout_Suite::~Layout_Suite() { - if (storage_ == fld::Tool_Store::INTERNAL) return; + if (storage_ == fluid::Tool_Store::INTERNAL) return; if (name_) ::free(name_); for (int i = 0; i < 3; ++i) { delete layout[i]; @@ -615,7 +615,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_ != fluid::Tool_Store::INTERNAL) suite.~Layout_Suite(); } ::free(list_); @@ -660,9 +660,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(fluid::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, fluid::Tool_Store::FILE); return 0; } @@ -673,14 +673,14 @@ 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, fluid::Tool_Store::FILE); return 0; } /** Write Suite and Layout selection and selected layout data to Preferences database. */ -void Layout_List::write(Fl_Preferences &prefs, fld::Tool_Store storage) { +void Layout_List::write(Fl_Preferences &prefs, fluid::Tool_Store storage) { Fl_Preferences prefs_list(prefs, "Layouts"); prefs_list.clear(); prefs_list.set("current_suite", list_[current_suite()].name_); @@ -698,7 +698,7 @@ void Layout_List::write(Fl_Preferences &prefs, fld::Tool_Store storage) { /** Read Suite and Layout selection and selected layout data to Preferences database. */ -void Layout_List::read(Fl_Preferences &prefs, fld::Tool_Store storage) { +void Layout_List::read(Fl_Preferences &prefs, fluid::Tool_Store storage) { Fl_Preferences prefs_list(prefs, "Layouts"); std::string cs; int cp = 0; @@ -723,12 +723,12 @@ void Layout_List::read(Fl_Preferences &prefs, fld::Tool_Store storage) { /** Write Suite and Layout selection and project layout data to an .fl project file. */ -void Layout_List::write(fld::io::Project_Writer *out) { +void Layout_List::write(fluid::io::Project_Writer *out) { // Don't write the Snap field if no custom layout was used if ((current_suite()==0) && (current_preset()==0)) { int nSuite = 0; for (int i=0; iwrite_string(" current_preset %d\n", current_preset()); for (int i=0; iwrite_string("}"); @@ -746,7 +746,7 @@ void Layout_List::write(fld::io::Project_Writer *out) { /** Read Suite and Layout selection and project layout data from an .fl project file. */ -void Layout_List::read(fld::io::Project_Reader *in) { +void Layout_List::read(fluid::io::Project_Reader *in) { const char *key; key = in->read_word(1); if (key && !strcmp(key, "{")) { @@ -764,7 +764,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(fluid::Tool_Store::PROJECT); } else if (!strcmp(key, "}")) { break; } else { @@ -869,9 +869,9 @@ int Layout_List::add(const char *name) { new_suite.layout[i] = new Layout_Preset; ::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; + fluid::Tool_Store new_storage = old_suite.storage_; + if (new_storage == fluid::Tool_Store::INTERNAL) + new_storage = fluid::Tool_Store::USER; new_suite.storage(new_storage); main_menu_[n].label(new_suite.menu_label); main_menu_[n].callback(main_menu_[0].callback()); @@ -912,9 +912,9 @@ 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 fluid::Tool_Store::INTERNAL, etc. */ -void Layout_List::remove_all(fld::Tool_Store storage) { +void Layout_List::remove_all(fluid::Tool_Store storage) { for (int i=list_size_-1; i>=0; --i) { if (list_[i].storage_ == storage) remove(i); diff --git a/fluid/app/Snap_Action.h b/fluid/app/Snap_Action.h index e5f4c998a..f8de2bec1 100644 --- a/fluid/app/Snap_Action.h +++ b/fluid/app/Snap_Action.h @@ -26,15 +26,15 @@ class Fl_Preferences; extern Fl_Menu_Item main_layout_submenu_[]; -namespace fld { -enum class Tool_Store; // fld:: +namespace fluid { +enum class Tool_Store; // fluid:: namespace io { -class Project_Reader; // fld::io:: -class Project_Writer; // fld::io:: +class Project_Reader; // fluid::io:: +class Project_Writer; // fluid::io:: } // namespace io -} // namespace fld +} // namespace fluid -namespace fld { +namespace fluid { namespace app { /** @@ -78,8 +78,8 @@ public: void write(Fl_Preferences &prefs); void read(Fl_Preferences &prefs); - void write(fld::io::Project_Writer*); - void read(fld::io::Project_Reader*); + void write(fluid::io::Project_Writer*); + void read(fluid::io::Project_Reader*); int textsize_not_null(); }; @@ -99,13 +99,13 @@ public: char *name_; ///< name of the suite char *menu_label; ///< label text used in pulldown menu Layout_Preset *layout[3]; ///< presets for application, dialog, and toolbox windows - fld::Tool_Store storage_; ///< storage location (see fld::Tool_Store::INTERNAL, etc.) + fluid::Tool_Store storage_; ///< storage location (see fluid::Tool_Store::INTERNAL, etc.) void write(Fl_Preferences &prefs); void read(Fl_Preferences &prefs); - void write(fld::io::Project_Writer*); - void read(fld::io::Project_Reader*); + void write(fluid::io::Project_Writer*); + void read(fluid::io::Project_Reader*); void update_label(); - void storage(fld::Tool_Store s) { storage_ = s; update_label(); } + void storage(fluid::Tool_Store s) { storage_ = s; update_label(); } void name(const char *n); void init(); ~Layout_Suite(); @@ -149,13 +149,13 @@ public: int load(const std::string &filename); int save(const std::string &filename); - void write(Fl_Preferences &prefs, fld::Tool_Store storage); - void read(Fl_Preferences &prefs, fld::Tool_Store storage); - void write(fld::io::Project_Writer*); - void read(fld::io::Project_Reader*); + void write(Fl_Preferences &prefs, fluid::Tool_Store storage); + void read(Fl_Preferences &prefs, fluid::Tool_Store storage); + void write(fluid::io::Project_Writer*); + void read(fluid::io::Project_Reader*); int add(Layout_Suite*); void remove(int index); - void remove_all(fld::Tool_Store storage); + void remove_all(fluid::Tool_Store storage); Layout_Preset *at(int); int size(); }; @@ -201,7 +201,7 @@ public: }; } // namespace app -} // namespace fld +} // namespace fluid #endif // _FLUID_FD_SNAP_ACTION_H diff --git a/fluid/app/args.cxx b/fluid/app/args.cxx index 9638611b8..a0f78a930 100644 --- a/fluid/app/args.cxx +++ b/fluid/app/args.cxx @@ -22,8 +22,8 @@ #include #include -using namespace fld; -using namespace fld::app; +using namespace fluid; +using namespace fluid::app; /** Load args from command line into variables. diff --git a/fluid/app/args.h b/fluid/app/args.h index 80dfa2290..ee6aecaa6 100644 --- a/fluid/app/args.h +++ b/fluid/app/args.h @@ -19,7 +19,7 @@ #include -namespace fld { +namespace fluid { namespace app { class Args { @@ -49,7 +49,7 @@ public: }; } // namespace app -} // namespace fld +} // namespace fluid #endif // FLUID_APP_ARGS_H diff --git a/fluid/app/history.cxx b/fluid/app/history.cxx index 7eadb5469..2e4ea28a9 100644 --- a/fluid/app/history.cxx +++ b/fluid/app/history.cxx @@ -20,8 +20,8 @@ #include "../src/flstring.h" -using namespace fld; -using namespace fld::app; +using namespace fluid; +using namespace fluid::app; /** @@ -71,7 +71,7 @@ void History::update(std::string project_file) { Fluid.preferences.get("recent_files", max_files, 5); if (max_files > 10) max_files = 10; - std::string absolute = fld::fix_separators(fl_filename_absolute_str(project_file)); + std::string absolute = fluid::fix_separators(fl_filename_absolute_str(project_file)); for (i = 0; i < max_files; i ++) #if defined(_WIN32) || defined(__APPLE__) if (!strcasecmp(absolute.c_str(), abspath[i])) break; diff --git a/fluid/app/history.h b/fluid/app/history.h index e32723b4b..83d543195 100644 --- a/fluid/app/history.h +++ b/fluid/app/history.h @@ -21,7 +21,7 @@ #include -namespace fld { +namespace fluid { namespace app { class History { @@ -39,7 +39,7 @@ public: }; } // namespace app -} // namespace fld +} // namespace fluid #endif // FLUID_APP_HISTORY_H diff --git a/fluid/app/shell_command.cxx b/fluid/app/shell_command.cxx index bd53a28af..a4ee6b072 100644 --- a/fluid/app/shell_command.cxx +++ b/fluid/app/shell_command.cxx @@ -62,7 +62,7 @@ // TODO: make the settings dialog resizable // TODO: make g_shell_config static, not a pointer, but don't load anything in batch mode -// FEATURE: fld::Tool_Store icons are currently redundant with @file and @save and could be improved +// FEATURE: fluid::Tool_Store icons are currently redundant with @file and @save and could be improved // FEATURE: hostname, username, getenv support? // FEATURE: add the files ./fluid.prefs and ./fluid.user.prefs as tool locations // FEATURE: interpret compiler output, for example: clang, and highlight errors and warnings @@ -110,7 +110,7 @@ #include -using namespace fld; +using namespace fluid; static std::string fltk_config_cmd; static Fl_Process s_proc; @@ -426,7 +426,7 @@ void run_shell_command(const std::string &cmd, int flags) { */ Fd_Shell_Command::Fd_Shell_Command() : shortcut(0), - storage(fld::Tool_Store::USER), + storage(fluid::Tool_Store::USER), condition(0), flags(0), shell_menu_item_(nullptr) @@ -460,7 +460,7 @@ Fd_Shell_Command::Fd_Shell_Command(const std::string &in_name) : name(in_name), label(in_name), shortcut(0), - storage(fld::Tool_Store::USER), + storage(fluid::Tool_Store::USER), condition(Fd_Shell_Command::ALWAYS), command("echo \"Hello, FLUID!\""), flags(Fd_Shell_Command::SAVE_PROJECT|Fd_Shell_Command::SAVE_SOURCECODE), @@ -483,7 +483,7 @@ Fd_Shell_Command::Fd_Shell_Command(const std::string &in_name) Fd_Shell_Command::Fd_Shell_Command(const std::string &in_name, const std::string &in_label, Fl_Shortcut in_shortcut, - fld::Tool_Store in_storage, + fluid::Tool_Store in_storage, int in_condition, const std::string &in_condition_data, const std::string &in_command, @@ -569,7 +569,7 @@ void Fd_Shell_Command::read(Fl_Preferences &prefs) { prefs.get("shortcut", tmp, 0); shortcut = (Fl_Shortcut)tmp; prefs.get("storage", tmp, -1); - if (tmp != -1) storage = (fld::Tool_Store)tmp; + if (tmp != -1) storage = (fluid::Tool_Store)tmp; prefs.get("condition", condition, ALWAYS); prefs.get("condition_data", condition_data, ""); prefs.get("command", command, ""); @@ -587,10 +587,10 @@ void Fd_Shell_Command::write(Fl_Preferences &prefs, bool save_location) { if (flags != 0) prefs.set("flags", flags); } -void Fd_Shell_Command::read(class fld::io::Project_Reader *in) { +void Fd_Shell_Command::read(class fluid::io::Project_Reader *in) { const char *c = in->read_word(1); if (strcmp(c, "{")!=0) return; // expecting start of group - storage = fld::Tool_Store::PROJECT; + storage = fluid::Tool_Store::PROJECT; for (;;) { c = in->read_word(1); if (strcmp(c, "}")==0) break; // end of command list @@ -613,7 +613,7 @@ void Fd_Shell_Command::read(class fld::io::Project_Reader *in) { } } -void Fd_Shell_Command::write(class fld::io::Project_Writer *out) { +void Fd_Shell_Command::write(class fluid::io::Project_Writer *out) { out->write_string("\n command {"); out->write_string("\n name "); out->write_word(name); out->write_string("\n label "); out->write_word(label); @@ -672,7 +672,7 @@ void Fd_Shell_Command_List::clear() { /** remove all shell commands of the given storage location from the list. */ -void Fd_Shell_Command_List::clear(fld::Tool_Store storage) { +void Fd_Shell_Command_List::clear(fluid::Tool_Store storage) { for (int i=list_size-1; i>=0; i--) { if (list[i]->storage == storage) { remove(i); @@ -683,7 +683,7 @@ void Fd_Shell_Command_List::clear(fld::Tool_Store storage) { /** Read shell configuration from a preferences group. */ -void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fld::Tool_Store storage) { +void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fluid::Tool_Store storage) { // import the old shell commands from previous user settings if (&Fluid.preferences == &prefs) { int version; @@ -691,7 +691,7 @@ void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fld::Tool_Store storage) if (version == 0) { int save_fl, save_code, save_strings; Fd_Shell_Command *cmd = new Fd_Shell_Command(); - cmd->storage = fld::Tool_Store::USER; + cmd->storage = fluid::Tool_Store::USER; cmd->name = "Sample Shell Command"; cmd->label = "Sample Shell Command"; cmd->shortcut = FL_ALT+'g'; @@ -712,7 +712,7 @@ void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fld::Tool_Store storage) for (int i=0; istorage = fld::Tool_Store::USER; + cmd->storage = fluid::Tool_Store::USER; cmd->read(cmd_prefs); add(cmd); } @@ -721,12 +721,12 @@ void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fld::Tool_Store storage) /** Write shell configuration to a preferences group. */ -void Fd_Shell_Command_List::write(Fl_Preferences &prefs, fld::Tool_Store storage) { +void Fd_Shell_Command_List::write(Fl_Preferences &prefs, fluid::Tool_Store storage) { Fl_Preferences shell_commands(prefs, "shell_commands"); shell_commands.delete_all_groups(); int index = 0; for (int i=0; istorage == fld::Tool_Store::USER) { + if (list[i]->storage == fluid::Tool_Store::USER) { Fl_Preferences cmd(shell_commands, Fl_Preferences::Name(index++)); list[i]->write(cmd); } @@ -736,10 +736,10 @@ void Fd_Shell_Command_List::write(Fl_Preferences &prefs, fld::Tool_Store storage /** Read shell configuration from a project file. */ -void Fd_Shell_Command_List::read(fld::io::Project_Reader *in) { +void Fd_Shell_Command_List::read(fluid::io::Project_Reader *in) { const char *c = in->read_word(1); if (strcmp(c, "{")!=0) return; // expecting start of group - clear(fld::Tool_Store::PROJECT); + clear(fluid::Tool_Store::PROJECT); for (;;) { c = in->read_word(1); if (strcmp(c, "}")==0) break; // end of command list @@ -756,16 +756,16 @@ void Fd_Shell_Command_List::read(fld::io::Project_Reader *in) { /** Write shell configuration to a project file. */ -void Fd_Shell_Command_List::write(fld::io::Project_Writer *out) { +void Fd_Shell_Command_List::write(fluid::io::Project_Writer *out) { int n_in_project_file = 0; for (int i=0; istorage == fld::Tool_Store::PROJECT) + if (list[i]->storage == fluid::Tool_Store::PROJECT) n_in_project_file++; } if (n_in_project_file > 0) { out->write_string("\nshell_commands {"); for (int i=0; istorage == fld::Tool_Store::PROJECT) + if (list[i]->storage == fluid::Tool_Store::PROJECT) list[i]->write(out); } out->write_string("\n}"); @@ -953,7 +953,7 @@ void Fd_Shell_Command_List::import_from_file() { for (i = 0; i < n; i++) { Fl_Preferences cmd_prefs(shell_commands, Fl_Preferences::Name(i)); Fd_Shell_Command *cmd = new Fd_Shell_Command(); - cmd->storage = fld::Tool_Store::USER; + cmd->storage = fluid::Tool_Store::USER; cmd->read(cmd_prefs); g_shell_config->add(cmd); } diff --git a/fluid/app/shell_command.h b/fluid/app/shell_command.h index bc7a18c3e..cd1cf55c6 100644 --- a/fluid/app/shell_command.h +++ b/fluid/app/shell_command.h @@ -35,14 +35,14 @@ # include #endif -namespace fld { +namespace fluid { namespace io { class Project_Reader; class Project_Writer; } // namespace io -} // namespace fld +} // namespace fluid struct Fl_Menu_Item; class Fl_Widget; @@ -96,7 +96,7 @@ public: Fd_Shell_Command(const std::string &in_name, const std::string &in_label, Fl_Shortcut in_shortcut, - fld::Tool_Store in_storage, + fluid::Tool_Store in_storage, int in_condition, const std::string &in_condition_data, const std::string &in_command, @@ -104,7 +104,7 @@ public: std::string name { }; std::string label { }; Fl_Shortcut shortcut = 0; - fld::Tool_Store storage = fld::Tool_Store::USER; + fluid::Tool_Store storage = fluid::Tool_Store::USER; int condition = ALWAYS; // always, hide, windows only, linux only, mac only, user, machine std::string condition_data { }; // user name, machine name std::string command { }; @@ -113,8 +113,8 @@ public: void run(); void read(Fl_Preferences &prefs); void write(Fl_Preferences &prefs, bool save_location = false); - void read(class fld::io::Project_Reader*); - void write(class fld::io::Project_Writer*); + void read(class fluid::io::Project_Reader*); + void write(class fluid::io::Project_Writer*); void update_shell_menu(); bool is_active(); }; @@ -134,15 +134,15 @@ public: void insert(int index, Fd_Shell_Command *cmd); void remove(int index); void clear(); - void clear(fld::Tool_Store store); + void clear(fluid::Tool_Store store); // void move_up(); // void move_down(); // int load(const std::string &filename); // int save(const std::string &filename); - void read(Fl_Preferences &prefs, fld::Tool_Store storage); - void write(Fl_Preferences &prefs, fld::Tool_Store storage); - void read(class fld::io::Project_Reader*); - void write(class fld::io::Project_Writer*); + void read(Fl_Preferences &prefs, fluid::Tool_Store storage); + void write(Fl_Preferences &prefs, fluid::Tool_Store storage); + void read(class fluid::io::Project_Reader*); + void write(class fluid::io::Project_Writer*); void rebuild_shell_menu(); void update_settings_dialog(); diff --git a/fluid/app/templates.cxx b/fluid/app/templates.cxx index cbd266b13..05388b23e 100644 --- a/fluid/app/templates.cxx +++ b/fluid/app/templates.cxx @@ -28,14 +28,14 @@ #include #include "../src/flstring.h" -using namespace fld; -using namespace fld::app; +using namespace fluid; +using namespace fluid::app; /** Save a design template. \todo We should document the concept of templates. */ -void fld::app::save_template() { +void fluid::app::save_template() { // Setup the template panel... if (!template_panel) make_template_panel(); @@ -96,7 +96,7 @@ void fld::app::save_template() { "Replace", nullptr, c) == 0) return; } - if (!fld::io::write_file(Fluid.proj, filename)) { + if (!fluid::io::write_file(Fluid.proj, filename)) { fl_alert("Error writing %s: %s", filename, strerror(errno)); return; } diff --git a/fluid/app/templates.h b/fluid/app/templates.h index cedec9f76..689b7a976 100644 --- a/fluid/app/templates.h +++ b/fluid/app/templates.h @@ -17,13 +17,13 @@ #ifndef FLUID_APP_TEMPLATES_H #define FLUID_APP_TEMPLATES_H -namespace fld { +namespace fluid { namespace app { void save_template(); } // namespace app -} // namespace fld +} // namespace fluid #endif // FLUID_APP_TEMPLATES_H diff --git a/fluid/io/Code_Writer.cxx b/fluid/io/Code_Writer.cxx index 0de47bf61..7a47549e4 100644 --- a/fluid/io/Code_Writer.cxx +++ b/fluid/io/Code_Writer.cxx @@ -32,9 +32,9 @@ #include #include -using namespace fld; -using namespace fld::io; -using namespace fld::proj; +using namespace fluid; +using namespace fluid::io; +using namespace fluid::proj; /** Return true if c can be in a C identifier. @@ -698,14 +698,14 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { } } std::string loc_include, loc_conditional; - if (proj_.i18n.type==fld::I18n_Type::GNU) { + if (proj_.i18n.type==fluid::I18n_Type::GNU) { loc_include = proj_.i18n.gnu_include; loc_conditional = proj_.i18n.gnu_conditional; } else { loc_include = proj_.i18n.posix_include; loc_conditional = proj_.i18n.posix_conditional; } - if ((proj_.i18n.type != fld::I18n_Type::NONE) && !loc_include.empty()) { + if ((proj_.i18n.type != fluid::I18n_Type::NONE) && !loc_include.empty()) { int conditional = !loc_conditional.empty(); if (conditional) { write_c("#ifdef %s\n", loc_conditional.c_str()); @@ -715,7 +715,7 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { write_c("#%sinclude \"%s\"\n", indent(), loc_include.c_str()); else write_c("#%sinclude %s\n", indent(), loc_include.c_str()); - if (proj_.i18n.type == fld::I18n_Type::POSIX) { + if (proj_.i18n.type == fluid::I18n_Type::POSIX) { if (!proj_.i18n.posix_file.empty()) { write_c("extern nl_catd %s;\n", proj_.i18n.posix_file.c_str()); } else { @@ -727,14 +727,14 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { } if (conditional) { write_c("#else\n"); - if (proj_.i18n.type == fld::I18n_Type::GNU) { + if (proj_.i18n.type == fluid::I18n_Type::GNU) { if (!proj_.i18n.gnu_function.empty()) { write_c("#%sifndef %s\n", indent(), proj_.i18n.gnu_function.c_str()); write_c("#%sdefine %s(text) text\n", indent_plus(1), proj_.i18n.gnu_function.c_str()); write_c("#%sendif\n", indent()); } } - if (proj_.i18n.type == fld::I18n_Type::POSIX) { + if (proj_.i18n.type == fluid::I18n_Type::POSIX) { write_c("#%sifndef catgets\n", indent()); write_c("#%sdefine catgets(catalog, set, msgid, text) text\n", indent_plus(1)); write_c("#%sendif\n", indent()); @@ -742,7 +742,7 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { indentation--; write_c("#endif\n"); } - if (proj_.i18n.type == fld::I18n_Type::GNU && proj_.i18n.gnu_static_function[0]) { + if (proj_.i18n.type == fluid::I18n_Type::GNU && proj_.i18n.gnu_static_function[0]) { write_c("#ifndef %s\n", proj_.i18n.gnu_static_function.c_str()); write_c("#%sdefine %s(text) text\n", indent_plus(1), proj_.i18n.gnu_static_function.c_str()); write_c("#endif\n"); diff --git a/fluid/io/Code_Writer.h b/fluid/io/Code_Writer.h index 9008d6c27..db0c18ae5 100644 --- a/fluid/io/Code_Writer.h +++ b/fluid/io/Code_Writer.h @@ -35,7 +35,7 @@ struct Fd_Pointer_Tree; int is_id(char c); -namespace fld { +namespace fluid { class Project; @@ -136,6 +136,6 @@ public: }; } // namespace io -} // namespace fld +} // namespace fluid #endif // FLUID_IO_CODE_WRITER_H diff --git a/fluid/io/Project_Reader.cxx b/fluid/io/Project_Reader.cxx index a4c3695d6..65a9ba5cc 100644 --- a/fluid/io/Project_Reader.cxx +++ b/fluid/io/Project_Reader.cxx @@ -39,13 +39,13 @@ /// \defgroup flfile .fl Project File Operations /// \{ -using namespace fld; -using namespace fld::io; +using namespace fluid; +using namespace fluid::io; // This file contains code to read and write .fl files. /// If set, we read an old fdesign file and widget y coordinates need to be flipped. -int fld::io::fdesign_flip = 0; +int fluid::io::fdesign_flip = 0; /** \brief Read a .fl project file. @@ -57,7 +57,7 @@ int fld::io::fdesign_flip = 0; \param[in] strategy add new nodes after current or as last child \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::read_file(Project &proj, const char *filename, int merge, Strategy strategy) { +int fluid::io::read_file(Project &proj, const char *filename, int merge, Strategy strategy) { Project_Reader f(proj); strategy.source(Strategy::FROM_FILE); return f.read_project(filename, merge, strategy); diff --git a/fluid/io/Project_Reader.h b/fluid/io/Project_Reader.h index b25b04ead..07dc36fd3 100644 --- a/fluid/io/Project_Reader.h +++ b/fluid/io/Project_Reader.h @@ -26,7 +26,7 @@ class Node; -namespace fld { +namespace fluid { class Project; @@ -78,6 +78,6 @@ public: }; } // namespace io -} // namespace fld +} // namespace fluid #endif // FLUID_IO_PROJECT_READER_H diff --git a/fluid/io/Project_Writer.cxx b/fluid/io/Project_Writer.cxx index 54af531e9..72aad33e7 100644 --- a/fluid/io/Project_Writer.cxx +++ b/fluid/io/Project_Writer.cxx @@ -30,8 +30,8 @@ /// \defgroup flfile .fl Project File Operations /// \{ -using namespace fld; -using namespace fld::io; +using namespace fluid; +using namespace fluid::io; /** \brief Write an .fl design description file. @@ -42,7 +42,7 @@ using namespace fld::io; is used to implement copy and paste. \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::write_file(Project &proj, const char *filename, int selected_only, bool to_codeview) { +int fluid::io::write_file(Project &proj, const char *filename, int selected_only, bool to_codeview) { Project_Writer out(proj); return out.write_project(filename, selected_only, to_codeview); } diff --git a/fluid/io/Project_Writer.h b/fluid/io/Project_Writer.h index 69118f146..49c57eabc 100644 --- a/fluid/io/Project_Writer.h +++ b/fluid/io/Project_Writer.h @@ -25,7 +25,7 @@ class Node; -namespace fld { +namespace fluid { class Project; @@ -63,6 +63,6 @@ public: }; } // namespace io -} // namespace fld +} // namespace fluid #endif // FLUID_IO_PROJECT_WRITER_H diff --git a/fluid/io/String_Writer.cxx b/fluid/io/String_Writer.cxx index 4928e218a..b7f54ef05 100644 --- a/fluid/io/String_Writer.cxx +++ b/fluid/io/String_Writer.cxx @@ -21,8 +21,8 @@ #include "nodes/Window_Node.h" #include "nodes/Function_Node.h" -using namespace fld; -using namespace fld::io; +using namespace fluid; +using namespace fluid::io; /** Write a string to a file, replacing all non-ASCII characters with octal codes. @@ -60,7 +60,7 @@ static int write_escaped_strings(FILE *out, const char *text) { \param[in] filename file path and name to a file that will hold the strings \return 1 if the file could not be opened for writing, or the result of `fclose`. */ -int fld::io::write_strings(Project &proj, const std::string &filename) { +int fluid::io::write_strings(Project &proj, const std::string &filename) { Node *p; Widget_Node *w; int i; @@ -69,7 +69,7 @@ int fld::io::write_strings(Project &proj, const std::string &filename) { if (!fp) return 1; switch (proj.i18n.type) { - case fld::I18n_Type::NONE : /* None, just put static text out */ + case fluid::I18n_Type::NONE : /* None, just put static text out */ fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); for (auto w: proj.tree.all_widgets()) { @@ -83,7 +83,7 @@ int fld::io::write_strings(Project &proj, const std::string &filename) { } } break; - case fld::I18n_Type::GNU : /* GNU gettext, put a .po file out */ + case fluid::I18n_Type::GNU : /* GNU gettext, put a .po file out */ fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); for (p = proj.tree.first; p; p = p->next) { @@ -112,7 +112,7 @@ int fld::io::write_strings(Project &proj, const std::string &filename) { } } break; - case fld::I18n_Type::POSIX : /* POSIX catgets, put a .msg file out */ + case fluid::I18n_Type::POSIX : /* POSIX catgets, put a .msg file out */ fprintf(fp, "$ generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); fprintf(fp, "$set %s\n", proj.i18n.posix_set.c_str()); diff --git a/fluid/io/String_Writer.h b/fluid/io/String_Writer.h index 0109a32a3..bc12d231d 100644 --- a/fluid/io/String_Writer.h +++ b/fluid/io/String_Writer.h @@ -19,7 +19,7 @@ #include -namespace fld { +namespace fluid { class Project; @@ -28,6 +28,6 @@ namespace io { int write_strings(Project &proj, const std::string &filename); } // namespace io -} // namespace fld +} // namespace fluid #endif // FLUID_IO_STRING_WRITER_H diff --git a/fluid/nodes/Button_Node.cxx b/fluid/nodes/Button_Node.cxx index c1ac26e95..4740b7e3b 100644 --- a/fluid/nodes/Button_Node.cxx +++ b/fluid/nodes/Button_Node.cxx @@ -60,14 +60,14 @@ void Button_Node::ideal_size(int &w, int &h) { auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = layout->labelsize * 4 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } Fl_Widget *Button_Node::widget(int x, int y, int w, int h) { return new Fl_Button(x, y, w, h, "Button"); } -void Button_Node::write_properties(fld::io::Project_Writer &f) { +void Button_Node::write_properties(fluid::io::Project_Writer &f) { Widget_Node::write_properties(f); Fl_Button *btn = (Fl_Button*)o; if (btn->compact()) { @@ -76,7 +76,7 @@ void Button_Node::write_properties(fld::io::Project_Writer &f) { } } -void Button_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Button_Node::read_property(fluid::io::Project_Reader &f, const char *c) { Fl_Button *btn = (Fl_Button*)o; if (!strcmp(c, "compact")) { btn->compact((uchar)atol(f.read_word())); @@ -98,7 +98,7 @@ void Return_Button_Node::ideal_size(int &w, int &h) { auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = layout->labelsize * 4 + 8 + h; // make room for the symbol - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } Fl_Widget *Return_Button_Node::widget(int x, int y, int w, int h) { @@ -123,7 +123,7 @@ void Light_Button_Node::ideal_size(int &w, int &h) { auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = layout->labelsize * 4 + 8 + layout->labelsize; // make room for the light - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } Fl_Widget *Light_Button_Node::widget(int x, int y, int w, int h) { @@ -139,7 +139,7 @@ void Check_Button_Node::ideal_size(int &w, int &h) { auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = layout->labelsize * 4 + 8 + layout->labelsize; // make room for the symbol - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } Fl_Widget *Check_Button_Node::widget(int x, int y, int w, int h) { @@ -155,7 +155,7 @@ void Round_Button_Node::ideal_size(int &w, int &h) { auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = layout->labelsize * 4 + 8 + layout->labelsize; // make room for the symbol - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } Fl_Widget *Round_Button_Node::widget(int x, int y, int w, int h) { diff --git a/fluid/nodes/Button_Node.h b/fluid/nodes/Button_Node.h index ecdc8cc24..b4ad47cc3 100644 --- a/fluid/nodes/Button_Node.h +++ b/fluid/nodes/Button_Node.h @@ -38,8 +38,8 @@ public: int is_button() const override { return 1; } Type type() const override { return Type::Button; } bool is_a(Type inType) const override { return (inType==Type::Button) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; void copy_properties() override; }; diff --git a/fluid/nodes/Function_Node.cxx b/fluid/nodes/Function_Node.cxx index f140fb39d..7839dbf07 100644 --- a/fluid/nodes/Function_Node.cxx +++ b/fluid/nodes/Function_Node.cxx @@ -37,9 +37,9 @@ extern void open_panel(); -using namespace fld; -using namespace fld::io; -using namespace fld::proj; +using namespace fluid; +using namespace fluid::io; +using namespace fluid::proj; /// Set a current class, so that the code of the children is generated correctly. Class_Node *current_class = nullptr; @@ -218,7 +218,7 @@ Node *Function_Node::make(Strategy strategy) { - "C" is written if we want a C signature instead of C++ - "return_type" is followed by the return type of the function */ -void Function_Node::write_properties(fld::io::Project_Writer &f) { +void Function_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); switch (public_) { case 0: f.write_string("private"); break; @@ -235,7 +235,7 @@ void Function_Node::write_properties(fld::io::Project_Writer &f) { Read function specific properties fron an .fl file. \param[in] c read from this string */ -void Function_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Function_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"private")) { public_ = 0; } else if (!strcmp(c,"protected")) { @@ -312,9 +312,9 @@ static void clean_function_for_implementation(char *out, const char *function_na /** Write the code for the source and the header file. This writes the code that goes \b before all children of this class. - \see write_code2(fld::io::Code_Writer& f) + \see write_code2(fluid::io::Code_Writer& f) */ -void Function_Node::write_code1(fld::io::Code_Writer& f) { +void Function_Node::write_code1(fluid::io::Code_Writer& f) { constructor=0; havewidgets = 0; Node *child; @@ -443,9 +443,9 @@ void Function_Node::write_code1(fld::io::Code_Writer& f) { /** Write the code for the source and the header file. This writes the code that goes \b after all children of this class. - \see write_code1(fld::io::Code_Writer& f) + \see write_code1(fluid::io::Code_Writer& f) */ -void Function_Node::write_code2(fld::io::Code_Writer& f) { +void Function_Node::write_code2(fluid::io::Code_Writer& f) { Node *child; const char *var = "w"; char havechildren = 0; @@ -542,7 +542,7 @@ void Code_Node::open() { /** Grab changes from an external editor and write this node. */ -void Code_Node::write(fld::io::Project_Writer &f) { +void Code_Node::write(fluid::io::Project_Writer &f) { // External editor changes? If so, load changes into ram, update mtime/size if ( handle_editor_changes() == 1 ) { Fluid.main_window->redraw(); // tell fluid to redraw; edits may affect tree's contents @@ -553,7 +553,7 @@ void Code_Node::write(fld::io::Project_Writer &f) { /** Write the code block with the correct indentation. */ -void Code_Node::write_code1(fld::io::Code_Writer& f) { +void Code_Node::write_code1(fluid::io::Code_Writer& f) { // External editor changes? If so, load changes into ram, update mtime/size if ( handle_editor_changes() == 1 ) { Fluid.main_window->redraw(); // tell fluid to redraw; edits may affect tree's contents @@ -651,7 +651,7 @@ Node *CodeBlock_Node::make(Strategy strategy) { - "after" is followed by the code that comes after the children The "before" code is stored in the name() field. */ -void CodeBlock_Node::write_properties(fld::io::Project_Writer &f) { +void CodeBlock_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); if (!end_code().empty()) { f.write_string("after"); @@ -662,7 +662,7 @@ void CodeBlock_Node::write_properties(fld::io::Project_Writer &f) { /** Read the node specific properties. */ -void CodeBlock_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void CodeBlock_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"after")) { end_code(f.read_word()); } else { @@ -680,7 +680,7 @@ void CodeBlock_Node::open() { /** Write the "before" code. */ -void CodeBlock_Node::write_code1(fld::io::Code_Writer& f) { +void CodeBlock_Node::write_code1(fluid::io::Code_Writer& f) { const char* c = name(); f.write_c("%s%s {\n", f.indent(), c ? c : ""); f.indentation++; @@ -689,7 +689,7 @@ void CodeBlock_Node::write_code1(fld::io::Code_Writer& f) { /** Write the "after" code. */ -void CodeBlock_Node::write_code2(fld::io::Code_Writer& f) { +void CodeBlock_Node::write_code2(fluid::io::Code_Writer& f) { f.indentation--; if (!end_code().empty()) f.write_c("%s} %s\n", f.indent(), end_code().c_str()); @@ -753,7 +753,7 @@ Node *Decl_Node::make(Strategy strategy) { - "private"/"public"/"protected" - "local"/"global" if this is static or not */ -void Decl_Node::write_properties(fld::io::Project_Writer &f) { +void Decl_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); switch (public_) { case 0: f.write_string("private"); break; @@ -769,7 +769,7 @@ void Decl_Node::write_properties(fld::io::Project_Writer &f) { /** Read the specific properties. */ -void Decl_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Decl_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"public")) { public_ = 1; } else if (!strcmp(c,"private")) { @@ -797,7 +797,7 @@ void Decl_Node::open() { \todo There are a lot of side effect in this node depending on the given text and the parent node. They need to be understood and documented. */ -void Decl_Node::write_code1(fld::io::Code_Writer& f) { +void Decl_Node::write_code1(fluid::io::Code_Writer& f) { const char* c = name(); if (!c) return; // handle a few keywords differently if inside a class @@ -903,7 +903,7 @@ Node *Data_Node::make(Strategy strategy) { - "filename" followed by the filename of the file to inline - "textmode" if data is written in ASCII vs. binary */ -void Data_Node::write_properties(fld::io::Project_Writer &f) { +void Data_Node::write_properties(fluid::io::Project_Writer &f) { Decl_Node::write_properties(f); if (!filename().empty()) { f.write_string("filename"); @@ -921,7 +921,7 @@ void Data_Node::write_properties(fld::io::Project_Writer &f) { /** Read specific properties. */ -void Data_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Data_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"filename")) { storestring(f.read_word(), filename_, 1); } else if (!strcmp(c,"textmode")) { @@ -949,7 +949,7 @@ void Data_Node::open() { /** Write the content of the external file inline into the source code. */ -void Data_Node::write_code1(fld::io::Code_Writer& f) { +void Data_Node::write_code1(fluid::io::Code_Writer& f) { const char *message = nullptr; const char *c = name(); if (!c) return; @@ -1194,7 +1194,7 @@ Node *DeclBlock_Node::make(Strategy strategy) { - "public"/"protected" - "after" followed by the second code block. */ -void DeclBlock_Node::write_properties(fld::io::Project_Writer &f) { +void DeclBlock_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); // deprecated if (is_public()) f.write_string("public"); @@ -1208,7 +1208,7 @@ void DeclBlock_Node::write_properties(fld::io::Project_Writer &f) { /** Read the specific properties. */ -void DeclBlock_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void DeclBlock_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if(!strcmp(c,"public")) { write_map_ |= CODE_IN_HEADER; } else if(!strcmp(c,"protected")) { @@ -1233,7 +1233,7 @@ void DeclBlock_Node::open() { Write the \b before static code to the source file, and to the header file if declared public. The before code is stored in the name() field. */ -void DeclBlock_Node::write_static(fld::io::Code_Writer& f) { +void DeclBlock_Node::write_static(fluid::io::Code_Writer& f) { const char* c = name(); if (c && *c) { if (write_map_ & STATIC_IN_HEADER) @@ -1246,7 +1246,7 @@ void DeclBlock_Node::write_static(fld::io::Code_Writer& f) { /** Write the \b after static code to the source file, and to the header file if declared public. */ -void DeclBlock_Node::write_static_after(fld::io::Code_Writer& f) { +void DeclBlock_Node::write_static_after(fluid::io::Code_Writer& f) { if (!end_code().empty()) { if (write_map_ & STATIC_IN_HEADER) f.write_h("%s\n", end_code().c_str()); @@ -1259,7 +1259,7 @@ void DeclBlock_Node::write_static_after(fld::io::Code_Writer& f) { Write the \b before code to the source file, and to the header file if declared public. The before code is stored in the name() field. */ -void DeclBlock_Node::write_code1(fld::io::Code_Writer& f) { +void DeclBlock_Node::write_code1(fluid::io::Code_Writer& f) { const char* c = name(); if (c && *c) { if (write_map_ & CODE_IN_HEADER) @@ -1272,7 +1272,7 @@ void DeclBlock_Node::write_code1(fld::io::Code_Writer& f) { /** Write the \b after code to the source file, and to the header file if declared public. */ -void DeclBlock_Node::write_code2(fld::io::Code_Writer& f) { +void DeclBlock_Node::write_code2(fluid::io::Code_Writer& f) { if (!end_code().empty()) { if (write_map_ & CODE_IN_HEADER) f.write_h("%s\n", end_code().c_str()); @@ -1323,7 +1323,7 @@ Node *Comment_Node::make(Strategy strategy) { - "in_source"/"not_in_source" if the comment will be written to the source code - "in_header"/"not_in_header" if the comment will be written to the header file */ -void Comment_Node::write_properties(fld::io::Project_Writer &f) { +void Comment_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); if (in_c_) f.write_string("in_source"); else f.write_string("not_in_source"); if (in_h_) f.write_string("in_header"); else f.write_string("not_in_header"); @@ -1332,7 +1332,7 @@ void Comment_Node::write_properties(fld::io::Project_Writer &f) { /** Read extra properties. */ -void Comment_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Comment_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"in_source")) { in_c_ = 1; } else if (!strcmp(c,"not_in_source")) { @@ -1378,7 +1378,7 @@ void Comment_Node::open() { /** Write the comment to the files. */ -void Comment_Node::write_code1(fld::io::Code_Writer& f) { +void Comment_Node::write_code1(fluid::io::Code_Writer& f) { const char* c = name(); if (!c) return; if (!in_c_ && !in_h_) return; @@ -1463,7 +1463,7 @@ Node *Class_Node::make(Strategy strategy) { - ":" followed by the super class - "private"/"protected" */ -void Class_Node::write_properties(fld::io::Project_Writer &f) { +void Class_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); if (!base_class().empty()) { f.write_string(":"); @@ -1478,7 +1478,7 @@ void Class_Node::write_properties(fld::io::Project_Writer &f) { /** Read additional properties. */ -void Class_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Class_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"private")) { public_ = 0; } else if (!strcmp(c,"protected")) { @@ -1500,7 +1500,7 @@ void Class_Node::open() { /** Write the header code that declares this class. */ -void Class_Node::write_code1(fld::io::Code_Writer& f) { +void Class_Node::write_code1(fluid::io::Code_Writer& f) { parent_class = current_class; current_class = this; write_public_state = 0; @@ -1519,7 +1519,7 @@ void Class_Node::write_code1(fld::io::Code_Writer& f) { /** Write the header code that ends the declaration of this class. */ -void Class_Node::write_code2(fld::io::Code_Writer& f) { +void Class_Node::write_code2(fluid::io::Code_Writer& f) { f.write_h("};\n"); current_class = parent_class; } diff --git a/fluid/nodes/Function_Node.h b/fluid/nodes/Function_Node.h index 2b708cf17..51401c4bb 100644 --- a/fluid/nodes/Function_Node.h +++ b/fluid/nodes/Function_Node.h @@ -62,8 +62,8 @@ public: ~Function_Node() override = default; Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void open() override; int ismain() {return name_ == nullptr;} const char *type_name() override {return "Function";} @@ -73,8 +73,8 @@ public: int is_public() const override; Type type() const override { return Type::Function; } bool is_a(Type inType) const override { return (inType==Type::Function) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; int has_signature(const char *, const char*) const; std::string return_type() const { return return_type_; } void return_type(const std::string& t) { storestring(t, return_type_); } @@ -103,9 +103,9 @@ public: ~Code_Node() override = default; Node *make(Strategy strategy) override; - void write(fld::io::Project_Writer &f) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override { } + void write(fluid::io::Project_Writer &f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override { } void open() override; const char *type_name() override {return "code";} int is_code_block() const override {return 0;} @@ -130,7 +130,7 @@ class CodeBlock_Node : public Node public: typedef Node super; static CodeBlock_Node prototype; - + private: std::string end_code_; @@ -139,8 +139,8 @@ public: ~CodeBlock_Node() override = default; Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void open() override; const char *type_name() override {return "codeblock";} int is_code_block() const override {return 1;} @@ -148,8 +148,8 @@ public: int is_public() const override { return -1; } Type type() const override { return Type::CodeBlock; } bool is_a(Type inType) const override { return (inType==Type::CodeBlock) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; std::string end_code() const { return end_code_; } void end_code(const std::string& c) { storestring(c, end_code_); } }; @@ -171,12 +171,12 @@ public: ~Decl_Node() override = default; Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override { } + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override { } void open() override; const char *type_name() override {return "decl";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; int is_public() const override; Type type() const override { return Type::Decl; } bool is_a(Type inType) const override { return (inType==Type::Decl) ? true : super::is_a(inType); } @@ -203,12 +203,12 @@ public: ~Data_Node() override = default; Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override {} + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override {} void open() override; const char *type_name() override {return "data";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; Type type() const override { return Type::Data; } bool is_a(Type inType) const override { return (inType==Type::Data) ? true : super::is_a(inType); } void filename(const std::string& fn) { storestring(fn, filename_); } @@ -240,14 +240,14 @@ public: ~DeclBlock_Node() override = default; Node *make(Strategy strategy) override; - void write_static(fld::io::Code_Writer& f) override; - void write_static_after(fld::io::Code_Writer& f) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_static(fluid::io::Code_Writer& f) override; + void write_static_after(fluid::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void open() override; const char *type_name() override {return "declblock";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; int can_have_children() const override {return 1;} int is_decl_block() const override {return 1;} int is_public() const override; @@ -277,12 +277,12 @@ public: ~Comment_Node() override = default; Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override { } + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override { } void open() override; const char *type_name() override {return "comment";} - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; int is_public() const override { return 1; } Type type() const override { return Type::Comment; } bool is_a(Type inType) const override { return (inType==Type::Comment) ? true : super::is_a(inType); } @@ -314,8 +314,8 @@ public: Class_Node* parent_class; // save class if nested Node *make(Strategy strategy) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void open() override; const char *type_name() override {return "class";} int can_have_children() const override {return 1;} @@ -324,8 +324,8 @@ public: int is_public() const override; Type type() const override { return Type::Class; } bool is_a(Type inType) const override { return (inType==Type::Class) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; /** Get base class access and name. */ std::string base_class() const { return base_class_; } diff --git a/fluid/nodes/Grid_Node.cxx b/fluid/nodes/Grid_Node.cxx index 36812a9ce..73b7a8d45 100644 --- a/fluid/nodes/Grid_Node.cxx +++ b/fluid/nodes/Grid_Node.cxx @@ -343,7 +343,7 @@ void Grid_Node::copy_properties_for_children() { d->layout(); } -void Grid_Node::write_properties(fld::io::Project_Writer &f) +void Grid_Node::write_properties(fluid::io::Project_Writer &f) { super::write_properties(f); Fl_Grid* grid = (Fl_Grid*)o; @@ -408,7 +408,7 @@ void Grid_Node::write_properties(fld::io::Project_Writer &f) } } -void Grid_Node::read_property(fld::io::Project_Reader &f, const char *c) +void Grid_Node::read_property(fluid::io::Project_Reader &f, const char *c) { Fl_Grid* grid = (Fl_Grid*)o; if (!strcmp(c,"dimensions")) { @@ -458,7 +458,7 @@ void Grid_Node::read_property(fld::io::Project_Reader &f, const char *c) } } -void Grid_Node::write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate) { +void Grid_Node::write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate) { Fl_Grid *grid; Fl_Widget *child_widget; Fl_Grid::Cell *cell; @@ -505,7 +505,7 @@ void Grid_Node::write_parent_properties(fld::io::Project_Writer &f, Node *child, // NOTE: we have to do this in a loop just as ::read_property() in case a new // property is added. In the current setup, all the remaining properties // will be skipped -void Grid_Node::read_parent_property(fld::io::Project_Reader &f, Node *child, const char *property) { +void Grid_Node::read_parent_property(fluid::io::Project_Reader &f, Node *child, const char *property) { if (!child->is_true_widget()) { super::read_parent_property(f, child, property); return; @@ -544,7 +544,7 @@ void Grid_Node::read_parent_property(fld::io::Project_Reader &f, Node *child, co } } -void Grid_Node::write_code1(fld::io::Code_Writer& f) { +void Grid_Node::write_code1(fluid::io::Code_Writer& f) { const char *var = name() ? name() : "o"; Fl_Grid* grid = (Fl_Grid*)o; Widget_Node::write_code1(f); @@ -608,7 +608,7 @@ void Grid_Node::write_code1(fld::io::Code_Writer& f) { } } -void Grid_Node::write_code2(fld::io::Code_Writer& f) { +void Grid_Node::write_code2(fluid::io::Code_Writer& f) { const char *var = name() ? name() : "o"; Fl_Grid* grid = (Fl_Grid*)o; bool first_cell = true; diff --git a/fluid/nodes/Grid_Node.h b/fluid/nodes/Grid_Node.h index 4363164ee..9b37f7045 100644 --- a/fluid/nodes/Grid_Node.h +++ b/fluid/nodes/Grid_Node.h @@ -57,16 +57,16 @@ public: Fl_Widget *widget(int X,int Y,int W,int H) override; Type type() const override { return Type::Grid; } bool is_a(Type inType) const override { return (inType==Type::Grid) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; - void write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate) override; - void read_parent_property(fld::io::Project_Reader &f, Node *child, const char *property) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; + void write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate) override; + void read_parent_property(fluid::io::Project_Reader &f, Node *child, const char *property) override; Fl_Widget *enter_live_mode(int top=0) override; void leave_live_mode() override; void copy_properties() override; void copy_properties_for_children() override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void add_child(Node*, Node*) override; void move_child(Node*, Node*) override; void remove_child(Node*) override; diff --git a/fluid/nodes/Group_Node.cxx b/fluid/nodes/Group_Node.cxx index 7565a5552..d4a49f724 100644 --- a/fluid/nodes/Group_Node.cxx +++ b/fluid/nodes/Group_Node.cxx @@ -194,14 +194,14 @@ void Group_Node::ideal_size(int &w, int &h) { w = 140; h = 140; } - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } -void Group_Node::write_code1(fld::io::Code_Writer& f) { +void Group_Node::write_code1(fluid::io::Code_Writer& f) { Widget_Node::write_code1(f); } -void Group_Node::write_code2(fld::io::Code_Writer& f) { +void Group_Node::write_code2(fluid::io::Code_Writer& f) { const char *var = name() ? name() : "o"; write_extra_code(f); f.write_c("%s%s->end();\n", f.indent(), var); @@ -352,7 +352,7 @@ void Flex_Node::copy_properties_for_children() { d->layout(); } -void Flex_Node::write_properties(fld::io::Project_Writer &f) +void Flex_Node::write_properties(fluid::io::Project_Writer &f) { Group_Node::write_properties(f); Fl_Flex* flex = (Fl_Flex*)o; @@ -377,7 +377,7 @@ void Flex_Node::write_properties(fld::io::Project_Writer &f) } } -void Flex_Node::read_property(fld::io::Project_Reader &f, const char *c) +void Flex_Node::read_property(fluid::io::Project_Reader &f, const char *c) { Fl_Flex* flex = (Fl_Flex*)o; suspend_auto_layout = 1; @@ -425,7 +425,7 @@ void Flex_Node::postprocess_read() suspend_auto_layout = 0; } -void Flex_Node::write_code2(fld::io::Code_Writer& f) { +void Flex_Node::write_code2(fluid::io::Code_Writer& f) { const char *var = name() ? name() : "o"; Fl_Flex* flex = (Fl_Flex*)o; int lm, tm, rm, bm; @@ -714,7 +714,7 @@ Fl_Widget *Table_Node::enter_live_mode(int) { void Table_Node::ideal_size(int &w, int &h) { w = 160; h = 120; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } // ---- Tabs_Node --------------------------------------------------- MARK: - diff --git a/fluid/nodes/Group_Node.h b/fluid/nodes/Group_Node.h index 1aea39df5..1226c9245 100644 --- a/fluid/nodes/Group_Node.h +++ b/fluid/nodes/Group_Node.h @@ -56,8 +56,8 @@ public: Fl_Widget *widget(int X,int Y,int W,int H) override { Fl_Group_Proxy *g = new Fl_Group_Proxy(X,Y,W,H); Fl_Group::current(nullptr); return g;} Widget_Node *_make() override {return new Group_Node();} - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void add_child(Node*, Node*) override; void move_child(Node*, Node*) override; void remove_child(Node*) override; @@ -122,13 +122,13 @@ public: Fl_Flex *g = new Fl_Flex_Proxy(X,Y,W,H); Fl_Group::current(nullptr); return g;} Type type() const override { return Type::Flex; } bool is_a(Type inType) const override { return (inType==Type::Flex) ? true : super::is_a(inType); } - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; Fl_Widget *enter_live_mode(int top=0) override; void copy_properties() override; void copy_properties_for_children() override; void postprocess_read() override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; // void add_child(Node*, Node*) override; // void move_child(Node*, Node*) override; void remove_child(Node*) override; diff --git a/fluid/nodes/Menu_Node.cxx b/fluid/nodes/Menu_Node.cxx index c93dea9ef..c8f963a44 100644 --- a/fluid/nodes/Menu_Node.cxx +++ b/fluid/nodes/Menu_Node.cxx @@ -44,8 +44,8 @@ #include #include -using namespace fld; -using namespace fld::proj; +using namespace fluid; +using namespace fluid::proj; Fl_Menu_Item menu_item_type_menu[] = { {"Normal",0,nullptr,(void*)nullptr}, @@ -302,7 +302,7 @@ int isdeclare(const char *c); // Search backwards to find the parent menu button and return it's name. // Also put in i the index into the button's menu item array belonging // to this menu item. -const char* Menu_Item_Node::menu_name(fld::io::Code_Writer& f, int& i) { +const char* Menu_Item_Node::menu_name(fluid::io::Code_Writer& f, int& i) { i = 0; Node* t = prev; while (t && t->is_a(Type::Menu_Item)) { @@ -317,7 +317,7 @@ const char* Menu_Item_Node::menu_name(fld::io::Code_Writer& f, int& i) { return f.unique_id(t, "menu", t->name(), t->label()); } -void Menu_Item_Node::write_static(fld::io::Code_Writer& f) { +void Menu_Item_Node::write_static(fluid::io::Code_Writer& f) { if (active_image.asset && label() && label()[0]) { f.write_h_once("#include "); f.write_h_once("#include "); @@ -451,7 +451,7 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) { f.write_c("Fl_Menu_Item* %s::%s = %s::%s + %d;\n", k, c, k, n, i); } else { // if the name is an array, only define the array. - // The actual assignment is in write_code1(fld::io::Code_Writer& f) + // The actual assignment is in write_code1(fluid::io::Code_Writer& f) f.write_c("Fl_Menu_Item* %s::%s;\n", k, c); } } @@ -475,7 +475,7 @@ int Menu_Item_Node::flags() { return i; } -void Menu_Item_Node::write_item(fld::io::Code_Writer& f) { +void Menu_Item_Node::write_item(fluid::io::Code_Writer& f) { static const char * const labeltypes[] = { "FL_NORMAL_LABEL", "FL_NO_LABEL", @@ -494,13 +494,13 @@ void Menu_Item_Node::write_item(fld::io::Code_Writer& f) { // Label, can not be nullptr which has a special meaning here if (label() && label()[0]) switch (Fluid.proj.i18n.type) { - case fld::I18n_Type::GNU: + case fluid::I18n_Type::GNU: // we will call i18n when the menu is instantiated for the first time f.write_c("%s(", Fluid.proj.i18n.gnu_static_function.c_str()); f.write_cstring(label()); f.write_c(")"); break; - case fld::I18n_Type::POSIX: + case fluid::I18n_Type::POSIX: // fall through: strings can't be translated before a catalog is chosen default: f.write_cstring(label()); @@ -563,7 +563,7 @@ void Menu_Item_Node::write_item(fld::io::Code_Writer& f) { f.write_c("},\n"); } -void start_menu_initialiser(fld::io::Code_Writer& f, int &initialized, const char *name, int index) { +void start_menu_initialiser(fluid::io::Code_Writer& f, int &initialized, const char *name, int index) { if (!initialized) { initialized = 1; f.write_c("%s{ Fl_Menu_Item* o = &%s[%d];\n", f.indent(), name, index); @@ -571,7 +571,7 @@ void start_menu_initialiser(fld::io::Code_Writer& f, int &initialized, const cha } } -void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) { +void Menu_Item_Node::write_code1(fluid::io::Code_Writer& f) { int i; const char* mname = menu_name(f, i); if (!prev->is_a(Type::Menu_Item)) { @@ -618,12 +618,12 @@ void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) { f.write_c("%sml->labela = (char*)", f.indent()); active_image.asset->write_inline(f); f.write_c(";\n"); - if (Fluid.proj.i18n.type==fld::I18n_Type::NONE) { + if (Fluid.proj.i18n.type==fluid::I18n_Type::NONE) { f.write_c("%sml->labelb = o->label();\n", f.indent()); - } else if (Fluid.proj.i18n.type==fld::I18n_Type::GNU) { + } else if (Fluid.proj.i18n.type==fluid::I18n_Type::GNU) { f.write_c("%sml->labelb = %s(o->label());\n", f.indent(), Fluid.proj.i18n.gnu_function.c_str()); - } else if (Fluid.proj.i18n.type==fld::I18n_Type::POSIX) { + } else if (Fluid.proj.i18n.type==fluid::I18n_Type::POSIX) { f.write_c("%sml->labelb = catgets(%s,%s,i+%d,o->label());\n", f.indent(), Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(), @@ -636,17 +636,17 @@ void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) { active_image.asset->write_code(f, 0, "o"); } } - if ((Fluid.proj.i18n.type != fld::I18n_Type::NONE) && label() && label()[0]) { + if ((Fluid.proj.i18n.type != fluid::I18n_Type::NONE) && label() && label()[0]) { Fl_Labeltype t = o->labeltype(); if (active_image.asset) { // label was already copied a few lines up } else if ( t==FL_NORMAL_LABEL || t==FL_SHADOW_LABEL || t==FL_ENGRAVED_LABEL || t==FL_EMBOSSED_LABEL) { start_menu_initialiser(f, menuItemInitialized, mname, i); - if (Fluid.proj.i18n.type==fld::I18n_Type::GNU) { + if (Fluid.proj.i18n.type==fluid::I18n_Type::GNU) { f.write_c("%so->label(%s(o->label()));\n", f.indent(), Fluid.proj.i18n.gnu_function.c_str()); - } else if (Fluid.proj.i18n.type==fld::I18n_Type::POSIX) { + } else if (Fluid.proj.i18n.type==fluid::I18n_Type::POSIX) { f.write_c("%so->label(catgets(%s,%s,i+%d,o->label()));\n", f.indent(), Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(), @@ -666,7 +666,7 @@ void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) { } } -void Menu_Item_Node::write_code2(fld::io::Code_Writer&) {} +void Menu_Item_Node::write_code2(fluid::io::Code_Writer&) {} //////////////////////////////////////////////////////////////// // This is the base class for widgets that contain a menu (ie @@ -758,7 +758,7 @@ Node* Menu_Base_Node::click_test(int, int) { return this; } -void Menu_Manager_Node::write_code2(fld::io::Code_Writer& f) { +void Menu_Manager_Node::write_code2(fluid::io::Code_Writer& f) { if (next && next->is_a(Type::Menu_Item)) { f.write_c("%s%s->menu(%s);\n", f.indent(), name() ? name() : "o", f.unique_id(this, "menu", name(), label())); @@ -872,7 +872,7 @@ const char *Menu_Bar_Node::sys_menubar_proxy_name() { } -void Menu_Bar_Node::write_static(fld::io::Code_Writer& f) { +void Menu_Bar_Node::write_static(fluid::io::Code_Writer& f) { super::write_static(f); if (is_sys_menu_bar()) { f.write_h_once("#include "); @@ -892,7 +892,7 @@ void Menu_Bar_Node::write_static(fld::io::Code_Writer& f) { } } -void Menu_Bar_Node::write_code1(fld::io::Code_Writer& f) { +void Menu_Bar_Node::write_code1(fluid::io::Code_Writer& f) { super::write_code1(f); if (is_sys_menu_bar() && is_in_class()) { f.write_c("%s((%s*)%s)->_parent_class = (void*)this;\n", @@ -900,7 +900,7 @@ void Menu_Bar_Node::write_code1(fld::io::Code_Writer& f) { } } -//void Menu_Bar_Node::write_code2(fld::io::Code_Writer& f) { +//void Menu_Bar_Node::write_code2(fluid::io::Code_Writer& f) { // super::write_code2(f); //} diff --git a/fluid/nodes/Menu_Node.h b/fluid/nodes/Menu_Node.h index c86f2bbba..f4ef9cfbc 100644 --- a/fluid/nodes/Menu_Node.h +++ b/fluid/nodes/Menu_Node.h @@ -65,12 +65,12 @@ public: int is_button() const override {return 1;} // this gets shortcut to work Fl_Widget* widget(int,int,int,int) override {return nullptr;} Widget_Node* _make() override {return nullptr;} - virtual const char* menu_name(fld::io::Code_Writer& f, int& i); + virtual const char* menu_name(fluid::io::Code_Writer& f, int& i); int flags(); - void write_static(fld::io::Code_Writer& f) override; - void write_item(fld::io::Code_Writer& f); - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_static(fluid::io::Code_Writer& f) override; + void write_item(fluid::io::Code_Writer& f); + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; int is_true_widget() const override { return 0; } Type type() const override { return Type::Menu_Item; } bool is_a(Type inType) const override { return (inType==Type::Menu_Item) ? true : super::is_a(inType); } @@ -152,7 +152,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8; w = layout->textsize_not_null() * 6 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } int can_have_children() const override {return 1;} int menusize; @@ -162,7 +162,7 @@ public: void move_child(Node*, Node*) override { build_menu(); } void remove_child(Node*) override { build_menu();} Node* click_test(int x, int y) override = 0; - void write_code2(fld::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; void copy_properties() override = 0; Type type() const override { return Type::Menu_Manager_; } bool is_a(Type inType) const override { return (inType==Type::Menu_Manager_) ? true : super::is_a(inType); } @@ -302,9 +302,9 @@ public: const char *alt_type_name() override {return "fltk::MenuBar";} Fl_Widget *widget(int X,int Y,int W,int H) override {return new Fl_Menu_Bar(X,Y,W,H);} Widget_Node *_make() override {return new Menu_Bar_Node();} - void write_static(fld::io::Code_Writer& f) override; - void write_code1(fld::io::Code_Writer& f) override; -// void write_code2(fld::io::Code_Writer& f) override; + void write_static(fluid::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; +// void write_code2(fluid::io::Code_Writer& f) override; Type type() const override { return Type::Menu_Bar; } bool is_a(Type inType) const override { return (inType==Type::Menu_Bar) ? true : super::is_a(inType); } bool is_sys_menu_bar(); diff --git a/fluid/nodes/Node.cxx b/fluid/nodes/Node.cxx index c989d6f6d..5c12581e8 100644 --- a/fluid/nodes/Node.cxx +++ b/fluid/nodes/Node.cxx @@ -401,7 +401,7 @@ void delete_all(int selected_only) { if(!selected_only) { // reset the setting for the external shell command if (g_shell_config) { - g_shell_config->clear(fld::Tool_Store::PROJECT); + g_shell_config->clear(fluid::Tool_Store::PROJECT); g_shell_config->rebuild_shell_menu(); g_shell_config->update_settings_dialog(); } @@ -409,7 +409,7 @@ void delete_all(int selected_only) { widget_browser->hposition(0); widget_browser->vposition(0); } - Fluid.layout_list.remove_all(fld::Tool_Store::PROJECT); + Fluid.layout_list.remove_all(fluid::Tool_Store::PROJECT); Fluid.layout_list.current_suite(0); Fluid.layout_list.current_preset(0); Fluid.layout_list.update_dialogs(); @@ -891,7 +891,7 @@ void Node::move_before(Node* g) { // write a widget and all its children: -void Node::write(fld::io::Project_Writer &f) { +void Node::write(fluid::io::Project_Writer &f) { if (f.write_codeview()) proj1_start = (int)ftell(f.file()) + 1; if (f.write_codeview()) proj2_start = (int)ftell(f.file()) + 1; f.write_indent(level); @@ -923,7 +923,7 @@ void Node::write(fld::io::Project_Writer &f) { if (f.write_codeview()) proj2_end = (int)ftell(f.file()); } -void Node::write_properties(fld::io::Project_Writer &f) { +void Node::write_properties(fluid::io::Project_Writer &f) { // repeat this for each attribute: if (Fluid.proj.write_mergeback_data && uid_) { f.write_word("uid"); @@ -957,7 +957,7 @@ void Node::write_properties(fld::io::Project_Writer &f) { if (selected) f.write_word("selected"); } -void Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"uid")) { const char *hex = f.read_word(); int x = 0; @@ -1022,13 +1022,13 @@ void Node::read_property(fld::io::Project_Reader &f, const char *c) { Lastly, this method should call the super class to give it a chance to append its own properties. - \see Grid_Node::write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate) + \see Grid_Node::write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate) \param[in] f the project file writer \param[in] child write properties for this child, make sure it has the correct type \param[in] encapsulate write the `parent_properties {}` block if true before writing any properties */ -void Node::write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate) { +void Node::write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate) { (void)f; (void)child; (void)encapsulate; // nothing to do here // put the following code into your implementation of write_parent_properties @@ -1055,14 +1055,14 @@ void Node::write_parent_properties(fld::io::Project_Writer &f, Node *child, bool method reads back those properties. This function is virtual, so if a Type does not support a property, it will propagate to its super class. - \see Node::write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate) - \see Grid_Node::read_parent_property(fld::io::Project_Reader &f, Node *child, const char *property) + \see Node::write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate) + \see Grid_Node::read_parent_property(fluid::io::Project_Reader &f, Node *child, const char *property) \param[in] f the project file writer \param[in] child read properties for this child \param[in] property the name of a property, or "}" when we reach the end of the list */ -void Node::read_parent_property(fld::io::Project_Reader &f, Node *child, const char *property) { +void Node::read_parent_property(fluid::io::Project_Reader &f, Node *child, const char *property) { (void)child; f.read_error("Unknown parent property \"%s\"", property); } @@ -1074,7 +1074,7 @@ int Node::read_fdesign(const char*, const char*) {return 0;} Write a comment into the header file. \param[in] pre indent the comment by this string */ -void Node::write_comment_h(fld::io::Code_Writer& f, const char *pre) +void Node::write_comment_h(fluid::io::Code_Writer& f, const char *pre) { if (comment() && *comment()) { f.write_h("%s/**\n", pre); @@ -1097,7 +1097,7 @@ void Node::write_comment_h(fld::io::Code_Writer& f, const char *pre) /** Write a comment into the source file. */ -void Node::write_comment_c(fld::io::Code_Writer& f, const char *pre) +void Node::write_comment_c(fluid::io::Code_Writer& f, const char *pre) { if (comment() && *comment()) { f.write_c("%s/**\n", pre); @@ -1122,7 +1122,7 @@ void Node::write_comment_c(fld::io::Code_Writer& f, const char *pre) /** Write a comment into the source file. */ -void Node::write_comment_inline_c(fld::io::Code_Writer& f, const char *pre) +void Node::write_comment_inline_c(fluid::io::Code_Writer& f, const char *pre) { if (comment() && *comment()) { const char *s = comment(); @@ -1202,7 +1202,7 @@ int Node::user_defined(const char* cbname) const { return 0; } -const char *Node::callback_name(fld::io::Code_Writer& f) { +const char *Node::callback_name(fluid::io::Code_Writer& f) { if (is_name(callback())) return callback(); return f.unique_id(this, "cb", name(), label()); } @@ -1255,18 +1255,18 @@ bool Node::is_in_class() const { return false; } -void Node::write_static(fld::io::Code_Writer&) { +void Node::write_static(fluid::io::Code_Writer&) { } -void Node::write_static_after(fld::io::Code_Writer&) { +void Node::write_static_after(fluid::io::Code_Writer&) { } -void Node::write_code1(fld::io::Code_Writer& f) { +void Node::write_code1(fluid::io::Code_Writer& f) { f.write_h("// Header for %s\n", title()); f.write_c("// Code for %s\n", title()); } -void Node::write_code2(fld::io::Code_Writer&) { +void Node::write_code2(fluid::io::Code_Writer&) { } /** Set a uid that is unique within the project. diff --git a/fluid/nodes/Node.h b/fluid/nodes/Node.h index 60ea05978..c1f874e56 100644 --- a/fluid/nodes/Node.h +++ b/fluid/nodes/Node.h @@ -28,14 +28,14 @@ class Node; class Group_Node; class Window_Node; -namespace fld { +namespace fluid { namespace io { class Project_Reader; class Project_Writer; } // namespace io -} // namespace fld +} // namespace fluid /** Declare where a new type is placed and how to create it. @@ -55,8 +55,8 @@ class Project_Writer; Add a hierarchy of Types void Node::add(Node *p, Strategy strategy) int read_file(const char *filename, int merge, Strategy strategy) - Node *fld::io::Project_Reader::read_children(Node *p, int merge, Strategy strategy, char skip_options) - int fld::io::Project_Reader::read_project(const char *filename, int merge, Strategy strategy) + Node *fluid::io::Project_Reader::read_children(Node *p, int merge, Strategy strategy, char skip_options) + int fluid::io::Project_Reader::read_project(const char *filename, int merge, Strategy strategy) */ typedef struct Strategy { enum Flags { @@ -197,7 +197,7 @@ public: // things that should not be public: Node *first_child(); Node *factory; - const char *callback_name(fld::io::Code_Writer& f); + const char *callback_name(fluid::io::Code_Writer& f); // text positions of this type in code, header, and project file (see codeview) int code_static_start, code_static_end; @@ -259,22 +259,22 @@ public: virtual void open(); // what happens when you double-click // read and write data to a saved file: - virtual void write(fld::io::Project_Writer &f); - virtual void write_properties(fld::io::Project_Writer &f); - virtual void read_property(fld::io::Project_Reader &f, const char *); - virtual void write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate); - virtual void read_parent_property(fld::io::Project_Reader &f, Node *child, const char *property); + virtual void write(fluid::io::Project_Writer &f); + virtual void write_properties(fluid::io::Project_Writer &f); + virtual void read_property(fluid::io::Project_Reader &f, const char *); + virtual void write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate); + virtual void read_parent_property(fluid::io::Project_Reader &f, Node *child, const char *property); virtual int read_fdesign(const char*, const char*); virtual void postprocess_read() { } // write code, these are called in order: - virtual void write_static(fld::io::Code_Writer& f); // write static stuff to .c file - virtual void write_static_after(fld::io::Code_Writer& f); // write static stuff after children - virtual void write_code1(fld::io::Code_Writer& f); // code and .h before children - virtual void write_code2(fld::io::Code_Writer& f); // code and .h after children - void write_comment_h(fld::io::Code_Writer& f, const char *ind=""); // write the commentary text into the header file - void write_comment_c(fld::io::Code_Writer& f, const char *ind=""); // write the commentary text into the source file - void write_comment_inline_c(fld::io::Code_Writer& f, const char *ind=nullptr); // write the commentary text + virtual void write_static(fluid::io::Code_Writer& f); // write static stuff to .c file + virtual void write_static_after(fluid::io::Code_Writer& f); // write static stuff after children + virtual void write_code1(fluid::io::Code_Writer& f); // code and .h before children + virtual void write_code2(fluid::io::Code_Writer& f); // code and .h after children + void write_comment_h(fluid::io::Code_Writer& f, const char *ind=""); // write the commentary text into the header file + void write_comment_c(fluid::io::Code_Writer& f, const char *ind=""); // write the commentary text into the source file + void write_comment_inline_c(fluid::io::Code_Writer& f, const char *ind=nullptr); // write the commentary text // live mode virtual Fl_Widget *enter_live_mode(int top=0); // build widgets needed for live mode diff --git a/fluid/nodes/Tree.cxx b/fluid/nodes/Tree.cxx index 92b5e7506..e079b56ca 100644 --- a/fluid/nodes/Tree.cxx +++ b/fluid/nodes/Tree.cxx @@ -19,8 +19,8 @@ #include "Project.h" -using namespace fld; -using namespace fld::node; +using namespace fluid; +using namespace fluid::node; Tree::Iterator::Iterator(Node *t, bool only_selected) diff --git a/fluid/nodes/Tree.h b/fluid/nodes/Tree.h index f494af651..87453e801 100644 --- a/fluid/nodes/Tree.h +++ b/fluid/nodes/Tree.h @@ -21,7 +21,7 @@ class Node; -namespace fld { +namespace fluid { class Project; @@ -100,7 +100,7 @@ public: }; } // namespace node -} // namespace fld +} // namespace fluid #endif // FLUID_NODES_TREE_H diff --git a/fluid/nodes/Widget_Image.cxx b/fluid/nodes/Widget_Image.cxx index cbc04acb9..da62b3109 100644 --- a/fluid/nodes/Widget_Image.cxx +++ b/fluid/nodes/Widget_Image.cxx @@ -76,7 +76,7 @@ void Widget_Image::apply_to_widget(Fl_Widget* w, bool deimage) const { Delegates to Image_Asset::write_static() using this slot's \c compress setting. Does nothing when no asset is loaded or the asset has already been written. */ -void Widget_Image::write_static(fld::io::Code_Writer& f) const { +void Widget_Image::write_static(fluid::io::Code_Writer& f) const { if (asset && !f.c_contains(asset.get())) asset->write_static(f, compress); } @@ -88,7 +88,7 @@ void Widget_Image::write_static(fld::io::Code_Writer& f) const { of \c scale_w or \c scale_h is nonzero, the matching \c ->scale() call. Does nothing when no asset is loaded. */ -void Widget_Image::write_code(fld::io::Code_Writer& f, const char* var, bool deimage) const { +void Widget_Image::write_code(fluid::io::Code_Writer& f, const char* var, bool deimage) const { if (!asset) return; asset->write_code(f, bind, var, deimage ? 1 : 0); if (scale_w || scale_h) { @@ -112,7 +112,7 @@ void Widget_Image::write_code(fld::io::Code_Writer& f, const char* var, bool dei Writes nothing when \c name is empty; omits the scale and bind entries when they hold their default values. */ -void Widget_Image::write_properties(fld::io::Project_Writer& f, bool deimage) const { +void Widget_Image::write_properties(fluid::io::Project_Writer& f, bool deimage) const { if (!name.empty()) { if (scale_w || scale_h) f.write_string(deimage ? "scale_deimage {%d %d}" : "scale_image {%d %d}", scale_w, scale_h); diff --git a/fluid/nodes/Widget_Image.h b/fluid/nodes/Widget_Image.h index 86f1d0fb9..1b9297592 100644 --- a/fluid/nodes/Widget_Image.h +++ b/fluid/nodes/Widget_Image.h @@ -57,13 +57,13 @@ public: void apply_to_widget(Fl_Widget* w, bool deimage) const; /// Write static image data into the generated source file. - void write_static(fld::io::Code_Writer& f) const; + void write_static(fluid::io::Code_Writer& f) const; /// Write widget image setup code (e.g., widget->image(img); image->scale(...)). - void write_code(fld::io::Code_Writer& f, const char* var, bool deimage) const; + void write_code(fluid::io::Code_Writer& f, const char* var, bool deimage) const; /// Write image properties into a .fl project file. - void write_properties(fld::io::Project_Writer& f, bool deimage) const; + void write_properties(fluid::io::Project_Writer& f, bool deimage) const; }; #endif // FLUID_NODES_WIDGET_IMAGE_H diff --git a/fluid/nodes/Widget_Node.cxx b/fluid/nodes/Widget_Node.cxx index ae93edfd6..bfbd8629d 100644 --- a/fluid/nodes/Widget_Node.cxx +++ b/fluid/nodes/Widget_Node.cxx @@ -46,8 +46,8 @@ #undef max #include -using namespace fld; -using namespace fld::proj; +using namespace fluid; +using namespace fluid::proj; extern void redraw_browser(); @@ -95,7 +95,7 @@ std::string subclassname(Node* l) { void Widget_Node::ideal_size(int &w, int &h) { w = 120; h = 100; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } /** @@ -359,88 +359,88 @@ void label_cb(Fl_Input* i, void* v) { int widget_i = 0; -static int vars_i_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_i_cb(const fluid::widget::Formula_Input*, void* v) { return widget_i; } -static int vars_x_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_x_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = (Node*)v; if (t->is_widget()) return ((Widget_Node*)t)->o->x(); return 0; } -static int vars_y_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_y_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = (Node*)v; if (t->is_widget()) return ((Widget_Node*)t)->o->y(); return 0; } -static int vars_w_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_w_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = (Node*)v; if (t->is_widget()) return ((Widget_Node*)t)->o->w(); return 0; } -static int vars_h_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_h_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = (Node*)v; if (t->is_widget()) return ((Widget_Node*)t)->o->h(); return 0; } -static int vars_px_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_px_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->parent; if (t && t->is_widget()) return ((Widget_Node*)t)->o->x(); return 0; } -static int vars_py_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_py_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->parent; if (t && t->is_widget()) return ((Widget_Node*)t)->o->y(); return 0; } -static int vars_pw_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_pw_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->parent; if (t && t->is_widget()) return ((Widget_Node*)t)->o->w(); return 0; } -static int vars_ph_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_ph_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->parent; if (t && t->is_widget()) return ((Widget_Node*)t)->o->h(); return 0; } -static int vars_sx_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_sx_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->prev_sibling(); if (t && t->is_widget()) return ((Widget_Node*)t)->o->x(); return 0; } -static int vars_sy_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_sy_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->prev_sibling(); if (t && t->is_widget()) return ((Widget_Node*)t)->o->y(); return 0; } -static int vars_sw_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_sw_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->prev_sibling(); if (t && t->is_widget()) return ((Widget_Node*)t)->o->w(); return 0; } -static int vars_sh_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_sh_cb(const fluid::widget::Formula_Input*, void* v) { Node* t = ((Node*)v)->prev_sibling(); if (t && t->is_widget()) return ((Widget_Node*)t)->o->h(); @@ -469,27 +469,27 @@ static void calculate_bbox(Node* p) { } } -static int vars_cx_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_cx_cb(const fluid::widget::Formula_Input*, void* v) { calculate_bbox((Node*)v); return bbox_x; } -static int vars_cy_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_cy_cb(const fluid::widget::Formula_Input*, void* v) { calculate_bbox((Node*)v); return bbox_y; } -static int vars_cw_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_cw_cb(const fluid::widget::Formula_Input*, void* v) { calculate_bbox((Node*)v); return bbox_r - bbox_x; } -static int vars_ch_cb(const fld::widget::Formula_Input*, void* v) { +static int vars_ch_cb(const fluid::widget::Formula_Input*, void* v) { calculate_bbox((Node*)v); return bbox_b - bbox_y; } -fld::widget::Formula_Input_Vars widget_vars[] = { +fluid::widget::Formula_Input_Vars widget_vars[] = { { "i", vars_i_cb }, // zero based counter of selected widgets { "x", vars_x_cb }, // position and size of current widget { "y", vars_y_cb }, @@ -1446,7 +1446,7 @@ int isdeclare(const char* c) { return 0; } -void Widget_Node::write_static(fld::io::Code_Writer& f) { +void Widget_Node::write_static(fluid::io::Code_Writer& f) { std::string t = subclassname(this); if (subclass().empty() || (is_class() && (t.compare(0, 3, "Fl_")==0))) { f.write_h_once("#include "); @@ -1533,7 +1533,7 @@ void Widget_Node::write_static(fld::io::Code_Writer& f) { inactive_image.write_static(f); } -void Widget_Node::write_code1(fld::io::Code_Writer& f) { +void Widget_Node::write_code1(fluid::io::Code_Writer& f) { std::string t = subclassname(this); const char* c = array_name(this); if (c) { @@ -1631,15 +1631,15 @@ void Widget_Node::write_code1(fld::io::Code_Writer& f) { if (label() && *label()) { f.write_c(", "); switch (Fluid.proj.i18n.type) { - case fld::I18n_Type::NONE : /* None */ + case fluid::I18n_Type::NONE : /* None */ f.write_cstring(label()); break; - case fld::I18n_Type::GNU : /* GNU gettext */ + case fluid::I18n_Type::GNU : /* GNU gettext */ f.write_c("%s(", Fluid.proj.i18n.gnu_function.c_str()); f.write_cstring(label()); f.write_c(")"); break; - case fld::I18n_Type::POSIX : /* POSIX catgets */ + case fluid::I18n_Type::POSIX : /* POSIX catgets */ f.write_c("catgets(%s,%s,%d,", Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(), Fluid.proj.i18n.posix_set.c_str(), msgnum()); @@ -1659,7 +1659,7 @@ void Widget_Node::write_code1(fld::io::Code_Writer& f) { write_widget_code(f); } -void Widget_Node::write_color(fld::io::Code_Writer& f, const char* field, Fl_Color color) { +void Widget_Node::write_color(fluid::io::Code_Writer& f, const char* field, Fl_Color color) { const char* color_name = nullptr; switch (color) { case FL_FOREGROUND_COLOR: color_name = "FL_FOREGROUND_COLOR"; break; @@ -1697,23 +1697,23 @@ void Widget_Node::write_color(fld::io::Code_Writer& f, const char* field, Fl_Col } } -// this is split from write_code1(fld::io::Code_Writer& f) for Window_Node: -void Widget_Node::write_widget_code(fld::io::Code_Writer& f) { +// this is split from write_code1(fluid::io::Code_Writer& f) for Window_Node: +void Widget_Node::write_widget_code(fluid::io::Code_Writer& f) { Fl_Widget* tplate = ((Widget_Node*)factory)->o; const char* var = is_class() ? "this" : name() ? name() : "o"; if (!tooltip().empty()) { f.write_c("%s%s->tooltip(",f.indent(), var); switch (Fluid.proj.i18n.type) { - case fld::I18n_Type::NONE : /* None */ + case fluid::I18n_Type::NONE : /* None */ f.write_cstring(tooltip().c_str()); break; - case fld::I18n_Type::GNU : /* GNU gettext */ + case fluid::I18n_Type::GNU : /* GNU gettext */ f.write_c("%s(", Fluid.proj.i18n.gnu_function.c_str()); f.write_cstring(tooltip().c_str()); f.write_c(")"); break; - case fld::I18n_Type::POSIX : /* POSIX catgets */ + case fluid::I18n_Type::POSIX : /* POSIX catgets */ f.write_c("catgets(%s,%s,%d,", Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(), Fluid.proj.i18n.posix_set.c_str(), @@ -1879,26 +1879,26 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) { } } -void Widget_Node::write_extra_code(fld::io::Code_Writer& f) { +void Widget_Node::write_extra_code(fluid::io::Code_Writer& f) { for (int n=0; n < NUM_EXTRA_CODE; n++) if (!extra_code(n).empty() && !isdeclare(extra_code(n).c_str())) f.write_c("%s%s\n", f.indent(), extra_code(n).c_str()); } -void Widget_Node::write_block_close(fld::io::Code_Writer& f) { +void Widget_Node::write_block_close(fluid::io::Code_Writer& f) { f.indentation--; f.write_c("%s} // %s* %s\n", f.indent(), subclassname(this).c_str(), name() ? name() : "o"); } -void Widget_Node::write_code2(fld::io::Code_Writer& f) { +void Widget_Node::write_code2(fluid::io::Code_Writer& f) { write_extra_code(f); write_block_close(f); } //////////////////////////////////////////////////////////////// -void Widget_Node::write_properties(fld::io::Project_Writer &f) { +void Widget_Node::write_properties(fluid::io::Project_Writer &f) { Node::write_properties(f); f.write_indent(level+1); switch (public_) { @@ -2021,7 +2021,7 @@ void Widget_Node::write_properties(fld::io::Project_Writer &f) { } } -void Widget_Node::read_property(fld::io::Project_Reader &f, const char* c) { +void Widget_Node::read_property(fluid::io::Project_Reader &f, const char* c) { int x,y,w,h; Fl_Font ft; int s; Fl_Color cc; if (!strcmp(c,"private")) { public_ = 0; @@ -2239,7 +2239,7 @@ int Widget_Node::read_fdesign(const char* propname, const char* value) { if (!strcmp(propname,"box")) { float x,y,w,h; if (sscanf(value,"%f %f %f %f",&x,&y,&w,&h) == 4) { - if (fld::io::fdesign_flip) { + if (fluid::io::fdesign_flip) { Node* p; for (p = parent; p && !p->is_a(Type::Window); p = p->parent) {/*empty*/} if (p && p->is_widget()) y = ((Widget_Node*)p)->o->h()-(y+h); diff --git a/fluid/nodes/Widget_Node.h b/fluid/nodes/Widget_Node.h index f4c119074..82f3fde8d 100644 --- a/fluid/nodes/Widget_Node.h +++ b/fluid/nodes/Widget_Node.h @@ -62,13 +62,13 @@ protected: /// disabling the output of the "hide" property by the Widget Type. uchar override_visible_ = 0; - void write_static(fld::io::Code_Writer& f) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_widget_code(fld::io::Code_Writer& f); - void write_extra_code(fld::io::Code_Writer& f); - void write_block_close(fld::io::Code_Writer& f); - void write_code2(fld::io::Code_Writer& f) override; - void write_color(fld::io::Code_Writer& f, const char*, Fl_Color); + void write_static(fluid::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_widget_code(fluid::io::Code_Writer& f); + void write_extra_code(fluid::io::Code_Writer& f); + void write_block_close(fluid::io::Code_Writer& f); + void write_code2(fluid::io::Code_Writer& f) override; + void write_color(fluid::io::Code_Writer& f, const char*, Fl_Color); /// Pointer to widget representing this node in live mode. Fl_Widget* live_widget = nullptr; @@ -122,8 +122,8 @@ public: int is_true_widget() const override { return 1; } int is_public() const override; - void write_properties(fld::io::Project_Writer& f) override; - void read_property(fld::io::Project_Reader& f, const char*) override; + void write_properties(fluid::io::Project_Writer& f) override; + void read_property(fluid::io::Project_Reader& f, const char*) override; int read_fdesign(const char*, const char*) override; Fl_Widget* enter_live_mode(int top = 0) override; diff --git a/fluid/nodes/Window_Node.cxx b/fluid/nodes/Window_Node.cxx index 83742b544..8b4f532b8 100644 --- a/fluid/nodes/Window_Node.cxx +++ b/fluid/nodes/Window_Node.cxx @@ -77,19 +77,19 @@ void i18n_type_cb(Fl_Choice *c, void *v) { c->value(static_cast(Fluid.proj.i18n.type)); } else { Fluid.proj.undo.checkpoint(); - Fluid.proj.i18n.type = static_cast(c->value()); + Fluid.proj.i18n.type = static_cast(c->value()); Fluid.proj.set_modflag(1); } switch (Fluid.proj.i18n.type) { - case fld::I18n_Type::NONE : /* None */ + case fluid::I18n_Type::NONE : /* None */ i18n_gnu_group->hide(); i18n_posix_group->hide(); break; - case fld::I18n_Type::GNU : /* GNU gettext */ + case fluid::I18n_Type::GNU : /* GNU gettext */ i18n_gnu_group->show(); i18n_posix_group->hide(); break; - case fld::I18n_Type::POSIX : /* POSIX cat */ + case fluid::I18n_Type::POSIX : /* POSIX cat */ i18n_gnu_group->hide(); i18n_posix_group->show(); break; @@ -339,7 +339,7 @@ void Window_Node::ideal_size(int &w, int &h) { Fl::screen_work_area(sx, sy, sw, sh, screen); w = std::min(w, sw*3/4); h = std::min(h, sh*3/4); } - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } @@ -359,7 +359,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(fluid::proj::Undo::OnceType::WINDOW_RESIZE)) Fluid.proj.set_modflag(1); } @@ -404,8 +404,8 @@ void Window_Node::newdx() { break; } } - fld::app::Snap_Data data = { mydx, mydy, bx, by, br, bt, drag, 4, 4, mydx, mydy, (Widget_Node*)selection, this }; - fld::app::Snap_Action::check_all(data); + fluid::app::Snap_Data data = { mydx, mydy, bx, by, br, bt, drag, 4, 4, mydx, mydy, (Widget_Node*)selection, this }; + fluid::app::Snap_Action::check_all(data); if (data.x_dist < 4) mydx = data.dx_out; if (data.y_dist < 4) mydy = data.dy_out; } @@ -652,8 +652,8 @@ void Window_Node::draw_overlay() { fl_rectf(mysx,myst-5,5,5); if (Fluid.show_guides && (drag & (FD_DRAG|FD_TOP|FD_LEFT|FD_BOTTOM|FD_RIGHT))) { - fld::app::Snap_Data data = { dx, dy, sx, sy, sr, st, drag, 4, 4, dx, dy, (Widget_Node*)selection, this}; - fld::app::Snap_Action::draw_all(data); + fluid::app::Snap_Data data = { dx, dy, sx, sy, sr, st, drag, 4, 4, dx, dy, (Widget_Node*)selection, this}; + fluid::app::Snap_Action::draw_all(data); } } @@ -1165,9 +1165,9 @@ int Window_Node::handle(int event) { if (Fl::event_state(FL_COMMAND)) { int x_step, y_step; if (drag & (FD_RIGHT|FD_BOTTOM)) - fld::app::Snap_Action::get_resize_stepsize(x_step, y_step); + fluid::app::Snap_Action::get_resize_stepsize(x_step, y_step); else - fld::app::Snap_Action::get_move_stepsize(x_step, y_step); + fluid::app::Snap_Action::get_move_stepsize(x_step, y_step); dx *= x_step; dy *= y_step; } @@ -1202,7 +1202,7 @@ int Window_Node::handle(int event) { Write the C++ code that comes before the children of the window are written. \param f the source code output stream */ -void Window_Node::write_code1(fld::io::Code_Writer& f) { +void Window_Node::write_code1(fluid::io::Code_Writer& f) { Widget_Node::write_code1(f); } @@ -1211,7 +1211,7 @@ void Window_Node::write_code1(fld::io::Code_Writer& f) { Write the C++ code that comes after the children of the window are written. \param f the source code output stream */ -void Window_Node::write_code2(fld::io::Code_Writer& f) { +void Window_Node::write_code2(fluid::io::Code_Writer& f) { const char *var = is_class() ? "this" : name() ? name() : "o"; // make the window modal or non-modal if (modal) { @@ -1246,7 +1246,7 @@ void Window_Node::write_code2(fld::io::Code_Writer& f) { write_block_close(f); } -void Window_Node::write_properties(fld::io::Project_Writer &f) { +void Window_Node::write_properties(fluid::io::Project_Writer &f) { Widget_Node::write_properties(f); if (modal) f.write_string("modal"); else if (non_modal) f.write_string("non_modal"); @@ -1257,7 +1257,7 @@ void Window_Node::write_properties(fld::io::Project_Writer &f) { if (o->visible() || override_visible_) f.write_string("visible"); } -void Window_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Window_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"modal")) { modal = 1; } else if (!strcmp(c,"non_modal")) { @@ -1345,7 +1345,7 @@ Node *Widget_Class_Node::make(Strategy strategy) { return myo; } -void Widget_Class_Node::write_properties(fld::io::Project_Writer &f) { +void Widget_Class_Node::write_properties(fluid::io::Project_Writer &f) { Window_Node::write_properties(f); if (wc_relative==1) f.write_string("position_relative"); @@ -1353,7 +1353,7 @@ void Widget_Class_Node::write_properties(fld::io::Project_Writer &f) { f.write_string("position_relative_rescale"); } -void Widget_Class_Node::read_property(fld::io::Project_Reader &f, const char *c) { +void Widget_Class_Node::read_property(fluid::io::Project_Reader &f, const char *c) { if (!strcmp(c,"position_relative")) { wc_relative = 1; } else if (!strcmp(c,"position_relative_rescale")) { @@ -1376,9 +1376,9 @@ static const char *trimclassname(const char *n) { } -void Widget_Class_Node::write_code1(fld::io::Code_Writer& f) { +void Widget_Class_Node::write_code1(fluid::io::Code_Writer& f) { #if 0 - Widget_Node::write_code1(fld::io::Code_Writer& f); + Widget_Node::write_code1(fluid::io::Code_Writer& f); #endif // 0 current_widget_class = this; @@ -1446,7 +1446,7 @@ void Widget_Class_Node::write_code1(fld::io::Code_Writer& f) { Write the C++ code that comes after the children of the window are written. \param f the source code output stream */ -void Widget_Class_Node::write_code2(fld::io::Code_Writer& f) { +void Widget_Class_Node::write_code2(fluid::io::Code_Writer& f) { // make the window modal or non-modal if (modal) { f.write_c("%sset_modal();\n", f.indent()); diff --git a/fluid/nodes/Window_Node.h b/fluid/nodes/Window_Node.h index a6846168b..9bf4f0b46 100644 --- a/fluid/nodes/Window_Node.h +++ b/fluid/nodes/Window_Node.h @@ -70,8 +70,8 @@ protected: void newposition(Widget_Node *,int &x,int &y,int &w,int &h); int handle(int); void setlabel(const char *) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; Widget_Node *_make() override {return nullptr;} // we don't call this Fl_Widget *widget(int,int,int,int) override {return nullptr;} int recalc; // set by fix_overlay() @@ -108,8 +108,8 @@ public: void fix_overlay(); // Update the bounding box, etc uchar *read_image(int &ww, int &hh); // Read an image of the window - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; int read_fdesign(const char*, const char*) override; void add_child(Node*, Node*) override; @@ -145,11 +145,11 @@ public: char write_public_state; // true when public: has been printed char wc_relative; // if 1, reposition all children, if 2, reposition and resize - void write_properties(fld::io::Project_Writer &f) override; - void read_property(fld::io::Project_Reader &f, const char *) override; + void write_properties(fluid::io::Project_Writer &f) override; + void read_property(fluid::io::Project_Reader &f, const char *) override; - void write_code1(fld::io::Code_Writer& f) override; - void write_code2(fld::io::Code_Writer& f) override; + void write_code1(fluid::io::Code_Writer& f) override; + void write_code2(fluid::io::Code_Writer& f) override; Node *make(Strategy strategy) override; const char *type_name() override {return "widget_class";} Type type() const override { return Type::Widget_Class; } diff --git a/fluid/nodes/factory.cxx b/fluid/nodes/factory.cxx index 8c4caa08d..8a1fa4ef0 100644 --- a/fluid/nodes/factory.cxx +++ b/fluid/nodes/factory.cxx @@ -122,7 +122,7 @@ public: void ideal_size(int &w, int &h) override { w = 120; h = 160; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Browser_"; } const char *alt_type_name() override { return "fltk::Browser_"; } @@ -255,7 +255,7 @@ public: void ideal_size(int &w, int &h) override { w = 120; h = 160; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Tree"; } const char *alt_type_name() override { return "fltk::TreeBrowser"; } @@ -310,7 +310,7 @@ public: void ideal_size(int &w, int &h) override { w = 160; h = 120; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Help_View"; } const char *alt_type_name() override { return "fltk::HelpView"; } @@ -393,7 +393,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8; w = layout->textsize_not_null() * 4 + 4 * h; // make room for the arrows - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Counter"; } const char *alt_type_name() override { return "fltk::Counter"; } @@ -423,7 +423,7 @@ public: auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = 3 * h; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Adjuster"; } const char *alt_type_name() override { return "fltk::Adjuster"; } @@ -460,7 +460,7 @@ private: public: void ideal_size(int &w, int &h) override { w = 60; h = 60; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Dial"; } const char *alt_type_name() override { return "fltk::Dial"; } @@ -498,7 +498,7 @@ public: auto layout = Fluid.proj.layout; w = layout->labelsize + 8; h = 4 * w; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Roller"; } const char *alt_type_name() override { return "fltk::Roller"; } @@ -542,7 +542,7 @@ public: auto layout = Fluid.proj.layout; w = layout->labelsize + 8; h = 4 * w; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Slider"; } const char *alt_type_name() override { return "fltk::Slider"; } @@ -652,7 +652,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8; w = layout->textsize_not_null() * 4 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Value_Input"; } const char *alt_type_name() override { return "fltk::ValueInput"; } @@ -695,7 +695,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8; w = layout->textsize_not_null() * 4 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Value_Output"; } const char *alt_type_name() override { return "fltk::ValueOutput"; } @@ -754,7 +754,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8; w = layout->textsize_not_null() * 6 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Input"; } const char *alt_type_name() override { return "fltk::Input"; } @@ -796,7 +796,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8 + 10; // Directoy bar is additional 10 pixels high w = layout->textsize_not_null() * 10 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_File_Input"; } const char *alt_type_name() override { return "fltk::FileInput"; } @@ -880,7 +880,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() * 4 + 8; w = layout->textsize_not_null() * 10 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Text_Display"; } const char *alt_type_name() override { return "fltk::TextDisplay"; } @@ -1043,7 +1043,7 @@ public: public: void ideal_size(int &w, int &h) override { w = 100; h = 100; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Box"; } const char *alt_type_name() override { return "fltk::Widget"; } @@ -1072,7 +1072,7 @@ public: public: void ideal_size(int &w, int &h) override { w = 80; h = 80; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Clock"; } const char *alt_type_name() override { return "fltk::Clock"; } @@ -1104,7 +1104,7 @@ public: auto layout = Fluid.proj.layout; h = layout->labelsize + 8; w = layout->labelsize * 12; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Progress"; } const char *alt_type_name() override { return "fltk::ProgressBar"; } @@ -1156,7 +1156,7 @@ public: auto layout = Fluid.proj.layout; h = layout->textsize_not_null() + 8; w = layout->textsize_not_null() * 4 + 8; - fld::app::Snap_Action::better_size(w, h); + fluid::app::Snap_Action::better_size(w, h); } const char *type_name() override { return "Fl_Spinner"; } const char *alt_type_name() override { return "fltk::Spinner"; } diff --git a/fluid/panels/codeview_panel.cxx b/fluid/panels/codeview_panel.cxx index 73510d6a4..e517f84f9 100644 --- a/fluid/panels/codeview_panel.cxx +++ b/fluid/panels/codeview_panel.cxx @@ -161,7 +161,7 @@ void update_codeview_cb(class Fl_Button*, void*) { } if (cv_project->visible_r()) { - fld::io::write_file(Fluid.proj, cv_design_filename, false, true); + fluid::io::write_file(Fluid.proj, cv_design_filename, false, true); int top = cv_project->top_line(); cv_project->buffer()->loadfile(cv_design_filename); cv_project->scroll(top, 0); @@ -171,13 +171,13 @@ void update_codeview_cb(class Fl_Button*, void*) { fl_strlcpy(fn, Fluid.get_tmpdir().c_str(), FL_PATH_MAX); fl_strlcat(fn, "strings", FL_PATH_MAX); fl_filename_setext(fn, FL_PATH_MAX, exts[static_cast(Fluid.proj.i18n.type)]); - fld::io::write_strings(Fluid.proj, fn); + fluid::io::write_strings(Fluid.proj, fn); int top = cv_strings->top_line(); cv_strings->buffer()->loadfile(fn); cv_strings->scroll(top, 0); } else if (cv_source->visible_r() || cv_header->visible_r()) { // Generate code into in-memory ostringstream buffers (no temp files). - fld::io::Code_Writer f(Fluid.proj); + fluid::io::Code_Writer f(Fluid.proj); std::string code_filename = Fluid.proj.codefile_path() + Fluid.proj.codefile_name(); std::string header_filename = Fluid.proj.headerfile_path() + Fluid.proj.headerfile_name(); if (Fluid.proj.proj_filename) @@ -257,13 +257,13 @@ Fl_Tabs* cv_tab = (Fl_Tabs*)nullptr; Fl_Group* cv_source_tab = (Fl_Group*)nullptr; -fld::widget::Code_Viewer* cv_source = (fld::widget::Code_Viewer*)nullptr; +fluid::widget::Code_Viewer* cv_source = (fluid::widget::Code_Viewer*)nullptr; -fld::widget::Code_Viewer* cv_header = (fld::widget::Code_Viewer*)nullptr; +fluid::widget::Code_Viewer* cv_header = (fluid::widget::Code_Viewer*)nullptr; -fld::widget::Text_Viewer* cv_strings = (fld::widget::Text_Viewer*)nullptr; +fluid::widget::Text_Viewer* cv_strings = (fluid::widget::Text_Viewer*)nullptr; -fld::widget::Text_Viewer* cv_project = (fld::widget::Text_Viewer*)nullptr; +fluid::widget::Text_Viewer* cv_project = (fluid::widget::Text_Viewer*)nullptr; Fl_Group* cv_find_row = (Fl_Group*)nullptr; @@ -392,7 +392,7 @@ Fl_Double_Window* make_codeview() { cv_tab->callback((Fl_Callback*)update_codeview_position_cb); { cv_source_tab = new Fl_Group(10, 35, 500, 415, "Source"); cv_source_tab->labelsize(13); - { fld::widget::Code_Viewer* o = cv_source = new fld::widget::Code_Viewer(10, 40, 500, 410); + { fluid::widget::Code_Viewer* o = cv_source = new fluid::widget::Code_Viewer(10, 40, 500, 410); cv_source->box(FL_DOWN_FRAME); cv_source->color(FL_BACKGROUND2_COLOR); cv_source->selection_color(FL_SELECTION_COLOR); @@ -407,14 +407,14 @@ Fl_Double_Window* make_codeview() { Fl_Group::current()->resizable(cv_source); o->linenumber_width(60); o->linenumber_size(o->Fl_Text_Display::textsize()); - } // fld::widget::Code_Viewer* cv_source + } // fluid::widget::Code_Viewer* cv_source cv_source_tab->end(); Fl_Group::current()->resizable(cv_source_tab); } // Fl_Group* cv_source_tab { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Header"); o->labelsize(13); o->hide(); - { fld::widget::Code_Viewer* o = cv_header = new fld::widget::Code_Viewer(10, 40, 500, 410); + { fluid::widget::Code_Viewer* o = cv_header = new fluid::widget::Code_Viewer(10, 40, 500, 410); cv_header->box(FL_DOWN_FRAME); cv_header->color(FL_BACKGROUND2_COLOR); cv_header->selection_color(FL_SELECTION_COLOR); @@ -429,13 +429,13 @@ Fl_Double_Window* make_codeview() { Fl_Group::current()->resizable(cv_header); o->linenumber_width(60); o->linenumber_size(o->Fl_Text_Display::textsize()); - } // fld::widget::Code_Viewer* cv_header + } // fluid::widget::Code_Viewer* cv_header o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Strings"); o->labelsize(13); o->hide(); - { fld::widget::Text_Viewer* o = cv_strings = new fld::widget::Text_Viewer(10, 40, 500, 410); + { fluid::widget::Text_Viewer* o = cv_strings = new fluid::widget::Text_Viewer(10, 40, 500, 410); cv_strings->box(FL_DOWN_FRAME); cv_strings->color(FL_BACKGROUND2_COLOR); cv_strings->selection_color(FL_SELECTION_COLOR); @@ -450,13 +450,13 @@ Fl_Double_Window* make_codeview() { Fl_Group::current()->resizable(cv_strings); o->linenumber_width(60); o->linenumber_size(o->Fl_Text_Display::textsize()); - } // fld::widget::Text_Viewer* cv_strings + } // fluid::widget::Text_Viewer* cv_strings o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Project"); o->labelsize(13); o->hide(); - { fld::widget::Text_Viewer* o = cv_project = new fld::widget::Text_Viewer(10, 40, 500, 410); + { fluid::widget::Text_Viewer* o = cv_project = new fluid::widget::Text_Viewer(10, 40, 500, 410); cv_project->box(FL_DOWN_FRAME); cv_project->color(FL_BACKGROUND2_COLOR); cv_project->selection_color(FL_SELECTION_COLOR); @@ -471,7 +471,7 @@ Fl_Double_Window* make_codeview() { Fl_Group::current()->resizable(cv_project); o->linenumber_width(60); o->linenumber_size(o->Fl_Text_Display::textsize()); - } // fld::widget::Text_Viewer* cv_project + } // fluid::widget::Text_Viewer* cv_project o->end(); } // Fl_Group* o cv_tab->end(); diff --git a/fluid/panels/codeview_panel.fl b/fluid/panels/codeview_panel.fl index 0341224bd..a8d2fadb8 100644 --- a/fluid/panels/codeview_panel.fl +++ b/fluid/panels/codeview_panel.fl @@ -187,7 +187,7 @@ if (!cv_design_filename) { } if (cv_project->visible_r()) { - fld::io::write_file(Fluid.proj, cv_design_filename, false, true); + fluid::io::write_file(Fluid.proj, cv_design_filename, false, true); int top = cv_project->top_line(); cv_project->buffer()->loadfile(cv_design_filename); cv_project->scroll(top, 0); @@ -197,13 +197,13 @@ if (cv_project->visible_r()) { fl_strlcpy(fn, Fluid.get_tmpdir().c_str(), FL_PATH_MAX); fl_strlcat(fn, "strings", FL_PATH_MAX); fl_filename_setext(fn, FL_PATH_MAX, exts[static_cast(Fluid.proj.i18n.type)]); - fld::io::write_strings(Fluid.proj, fn); + fluid::io::write_strings(Fluid.proj, fn); int top = cv_strings->top_line(); cv_strings->buffer()->loadfile(fn); cv_strings->scroll(top, 0); } else if (cv_source->visible_r() || cv_header->visible_r()) { // Generate code into in-memory ostringstream buffers (no temp files). - fld::io::Code_Writer f(Fluid.proj); + fluid::io::Code_Writer f(Fluid.proj); std::string code_filename = Fluid.proj.codefile_path() + Fluid.proj.codefile_name(); std::string header_filename = Fluid.proj.headerfile_path() + Fluid.proj.headerfile_name(); if (Fluid.proj.proj_filename) @@ -297,7 +297,7 @@ Function {make_codeview()} {open code0 {\#include "widgets/Code_Viewer.h"} code1 {o->linenumber_width(60);} code2 {o->linenumber_size(o->Fl_Text_Display::textsize());} - class {fld::widget::Code_Viewer} + class {fluid::widget::Code_Viewer} } } Fl_Group {} { @@ -309,7 +309,7 @@ Function {make_codeview()} {open code0 {\#include "widgets/Code_Viewer.h"} code1 {o->linenumber_width(60);} code2 {o->linenumber_size(o->Fl_Text_Display::textsize());} - class {fld::widget::Code_Viewer} + class {fluid::widget::Code_Viewer} } } Fl_Group {} { @@ -321,7 +321,7 @@ Function {make_codeview()} {open code0 {\#include "widgets/Text_Viewer.h"} code1 {o->linenumber_width(60);} code2 {o->linenumber_size(o->Fl_Text_Display::textsize());} - class {fld::widget::Text_Viewer} + class {fluid::widget::Text_Viewer} } } Fl_Group {} { @@ -333,7 +333,7 @@ Function {make_codeview()} {open code0 {\#include "widgets/Text_Viewer.h"} code1 {o->linenumber_width(60);} code2 {o->linenumber_size(o->Fl_Text_Display::textsize());} - class {fld::widget::Text_Viewer} + class {fluid::widget::Text_Viewer} } } } diff --git a/fluid/panels/codeview_panel.h b/fluid/panels/codeview_panel.h index d9409c477..b4f96da4f 100644 --- a/fluid/panels/codeview_panel.h +++ b/fluid/panels/codeview_panel.h @@ -34,11 +34,11 @@ extern Fl_Tabs* cv_tab; #include extern Fl_Group* cv_source_tab; #include "widgets/Code_Viewer.h" -extern fld::widget::Code_Viewer* cv_source; -extern fld::widget::Code_Viewer* cv_header; +extern fluid::widget::Code_Viewer* cv_source; +extern fluid::widget::Code_Viewer* cv_header; #include "widgets/Text_Viewer.h" -extern fld::widget::Text_Viewer* cv_strings; -extern fld::widget::Text_Viewer* cv_project; +extern fluid::widget::Text_Viewer* cv_strings; +extern fluid::widget::Text_Viewer* cv_project; extern Fl_Group* cv_find_row; #include extern Fl_Button* cv_find_text_case; diff --git a/fluid/panels/function_panel.cxx b/fluid/panels/function_panel.cxx index 1e1a7d368..409571725 100644 --- a/fluid/panels/function_panel.cxx +++ b/fluid/panels/function_panel.cxx @@ -78,7 +78,7 @@ Fl_Window* make_widgetbin() { o->callback((Fl_Callback*)type_make_cb, (void*)("CodeBlock")); o->image(pixmap[(int)Type::CodeBlock]); } // Fl_Button* o - { fld::widget::Bin_Window_Button* o = new fld::widget::Bin_Window_Button(55, 46, 24, 24); + { fluid::widget::Bin_Window_Button* o = new fluid::widget::Bin_Window_Button(55, 46, 24, 24); o->tooltip("Widget Class"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -91,7 +91,7 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Widget_Class]); - } // fld::widget::Bin_Window_Button* o + } // fluid::widget::Bin_Window_Button* o { Fl_Button* o = new Fl_Button(5, 71, 24, 24); o->tooltip("Declaration"); o->box(FL_THIN_UP_BOX); @@ -114,7 +114,7 @@ Fl_Window* make_widgetbin() { } // Fl_Group* o { Fl_Group* o = new Fl_Group(87, 19, 79, 79, "Groups"); o->labelsize(12); - { fld::widget::Bin_Window_Button* o = new fld::widget::Bin_Window_Button(89, 21, 24, 24); + { fluid::widget::Bin_Window_Button* o = new fluid::widget::Bin_Window_Button(89, 21, 24, 24); o->tooltip("Window"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -127,8 +127,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Window]); - } // fld::widget::Bin_Window_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(114, 21, 24, 24); + } // fluid::widget::Bin_Window_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(114, 21, 24, 24); o->tooltip("Group"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -141,8 +141,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Group]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(139, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(139, 21, 24, 24); o->tooltip("Pack"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -155,8 +155,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Pack]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(89, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(89, 46, 24, 24); o->tooltip("Tabs"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -169,8 +169,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Tabs]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(114, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(114, 46, 24, 24); o->tooltip("Scroll"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -183,8 +183,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Scroll]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(139, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(139, 46, 24, 24); o->tooltip("Flex"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -197,8 +197,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Flex]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(89, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(89, 71, 24, 24); o->tooltip("Tile"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -211,8 +211,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Tile]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(114, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(114, 71, 24, 24); o->tooltip("Wizard"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -225,8 +225,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Wizard]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(139, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(139, 71, 24, 24); o->tooltip("Grid"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -239,12 +239,12 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Grid]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(171, 19, 54, 79, "Buttons"); o->labelsize(12); - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(173, 21, 24, 24); + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(173, 21, 24, 24); o->tooltip("Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -257,8 +257,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Button]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(198, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(198, 21, 24, 24); o->tooltip("Return Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -271,8 +271,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Return_Button]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(173, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(173, 46, 24, 24); o->tooltip("Light Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -285,8 +285,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Light_Button]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(198, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(198, 46, 24, 24); o->tooltip("Repeat Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -299,8 +299,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Repeat_Button]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(173, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(173, 71, 24, 24); o->tooltip("Check Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -313,8 +313,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Check_Button]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(198, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(198, 71, 24, 24); o->tooltip("Round Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -327,12 +327,12 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Round_Button]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(230, 19, 104, 79, "Valuators"); o->labelsize(12); - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(232, 21, 24, 24); + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(232, 21, 24, 24); o->tooltip("Slider"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -345,8 +345,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Slider]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(257, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(257, 21, 24, 24); o->tooltip("Scroll Bar"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -359,8 +359,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Scrollbar]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(282, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(282, 21, 24, 24); o->tooltip("Value Slider"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -373,8 +373,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Value_Slider]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(307, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(307, 21, 24, 24); o->tooltip("Value Output"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -387,8 +387,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Value_Output]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(232, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(232, 46, 24, 24); o->tooltip("Adjuster"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -401,8 +401,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Adjuster]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(257, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(257, 46, 24, 24); o->tooltip("Counter"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -415,8 +415,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Counter]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(282, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(282, 46, 24, 24); o->tooltip("Dial"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -429,8 +429,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Dial]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(232, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(232, 71, 24, 24); o->tooltip("Roller"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -443,8 +443,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Roller]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(257, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(257, 71, 24, 24); o->tooltip("Spinner"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -457,8 +457,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Spinner]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(282, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(282, 71, 24, 24); o->tooltip("Value Input"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -471,12 +471,12 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Value_Input]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(339, 19, 54, 79, "Text"); o->labelsize(12); - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(341, 21, 24, 24); + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(341, 21, 24, 24); o->tooltip("Input"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -489,8 +489,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Input]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(366, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(366, 21, 24, 24); o->tooltip("Output"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -503,8 +503,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Output]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(341, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(341, 46, 24, 24); o->tooltip("Text Edit"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -517,8 +517,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Text_Editor]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(366, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(366, 46, 24, 24); o->tooltip("Text Display"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -531,8 +531,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Text_Display]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(341, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(341, 71, 24, 24); o->tooltip("File Input"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -545,8 +545,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::File_Input]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(366, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(366, 71, 24, 24); o->tooltip("Terminal"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -559,12 +559,12 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Terminal]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(398, 19, 79, 79, "Menus"); o->labelsize(12); - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(400, 22, 24, 24); + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(400, 22, 24, 24); o->tooltip("Input Choice"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -577,8 +577,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Input_Choice]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(425, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(425, 21, 24, 24); o->tooltip("Menu Item"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -591,8 +591,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Menu_Item]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(450, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(450, 21, 24, 24); o->tooltip("Menu Bar"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -605,8 +605,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Menu_Bar]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(400, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(400, 46, 24, 24); o->tooltip("Menu Button"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -619,8 +619,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Menu_Button]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(425, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(425, 46, 24, 24); o->tooltip("Checkbox Menu Item"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -633,8 +633,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Checkbox_Menu_Item]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(450, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(450, 46, 24, 24); o->tooltip("Sub Menu"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -647,8 +647,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Submenu]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(400, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(400, 71, 24, 24); o->tooltip("Choice"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -661,8 +661,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Choice]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(425, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(425, 71, 24, 24); o->tooltip("Radio Menu Item"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -675,12 +675,12 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Radio_Menu_Item]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(482, 19, 54, 79, "Browsers"); o->labelsize(12); - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(484, 21, 24, 24); + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(484, 21, 24, 24); o->tooltip("Browser"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -693,8 +693,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Browser]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(509, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(509, 21, 24, 24); o->tooltip("Tree"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -707,8 +707,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Tree]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(484, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(484, 46, 24, 24); o->tooltip("Check Browser"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -721,8 +721,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Check_Browser]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(509, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(509, 46, 24, 24); o->tooltip("Help Browser"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -735,8 +735,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Help_View]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(484, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(484, 71, 24, 24); o->tooltip("File Browser"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -749,8 +749,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::File_Browser]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(509, 71, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(509, 71, 24, 24); o->tooltip("Table"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -763,12 +763,12 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Table]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(540, 19, 55, 79, "Misc"); o->labelsize(12); - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(542, 21, 24, 24); + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(542, 21, 24, 24); o->tooltip("Box"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -781,8 +781,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Box]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(567, 21, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(567, 21, 24, 24); o->tooltip("Clock"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -795,8 +795,8 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Clock]); - } // fld::widget::Bin_Button* o - { fld::widget::Bin_Button* o = new fld::widget::Bin_Button(542, 46, 24, 24); + } // fluid::widget::Bin_Button* o + { fluid::widget::Bin_Button* o = new fluid::widget::Bin_Button(542, 46, 24, 24); o->tooltip("Progress"); o->box(FL_THIN_UP_BOX); o->color(FL_BACKGROUND_COLOR); @@ -809,7 +809,7 @@ Fl_Window* make_widgetbin() { o->align(Fl_Align(FL_ALIGN_CENTER)); o->when(FL_WHEN_RELEASE); o->image(pixmap[(int)Type::Progress]); - } // fld::widget::Bin_Button* o + } // fluid::widget::Bin_Button* o o->end(); } // Fl_Group* o widgetbin_panel->set_non_modal(); diff --git a/fluid/panels/function_panel.fl b/fluid/panels/function_panel.fl index f8f974d9b..11008c1ac 100644 --- a/fluid/panels/function_panel.fl +++ b/fluid/panels/function_panel.fl @@ -105,7 +105,7 @@ else callback type_make_cb tooltip {Widget Class} xywh {55 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Widget_Class]);} - class {fld::widget::Bin_Window_Button} + class {fluid::widget::Bin_Window_Button} } Fl_Button {} { user_data {"decl"} @@ -135,63 +135,63 @@ else callback type_make_cb tooltip Window xywh {89 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Window]);} - class {fld::widget::Bin_Window_Button} + class {fluid::widget::Bin_Window_Button} } Fl_Button {} { user_data {"Fl_Group"} callback type_make_cb tooltip Group xywh {114 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Group]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Pack"} callback type_make_cb tooltip Pack xywh {139 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Pack]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Tabs"} callback type_make_cb tooltip Tabs xywh {89 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Tabs]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Scroll"} callback type_make_cb tooltip Scroll xywh {114 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Scroll]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Flex"} callback type_make_cb tooltip Flex xywh {139 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Flex]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Tile"} callback type_make_cb tooltip Tile xywh {89 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Tile]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Wizard"} callback type_make_cb tooltip Wizard xywh {114 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Wizard]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Grid"} callback type_make_cb tooltip Grid xywh {139 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Grid]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } Fl_Group {} { @@ -203,42 +203,42 @@ else callback type_make_cb tooltip Button xywh {173 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Return_Button"} callback type_make_cb tooltip {Return Button} xywh {198 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Return_Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Light_Button"} callback type_make_cb tooltip {Light Button} xywh {173 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Light_Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Repeat_Button"} callback type_make_cb tooltip {Repeat Button} xywh {198 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Repeat_Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Check_Button"} callback type_make_cb tooltip {Check Button} xywh {173 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Check_Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Round_Button"} callback type_make_cb tooltip {Round Button} xywh {198 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Round_Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } Fl_Group {} { @@ -250,70 +250,70 @@ else callback type_make_cb tooltip Slider xywh {232 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Slider]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Scrollbar"} callback type_make_cb tooltip {Scroll Bar} xywh {257 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Scrollbar]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Value_Slider"} callback type_make_cb tooltip {Value Slider} xywh {282 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Value_Slider]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Value_Output"} callback type_make_cb tooltip {Value Output} xywh {307 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Value_Output]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Adjuster"} callback type_make_cb tooltip Adjuster xywh {232 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Adjuster]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Counter"} callback type_make_cb tooltip Counter xywh {257 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Counter]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Dial"} callback type_make_cb tooltip Dial xywh {282 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Dial]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Roller"} callback type_make_cb tooltip Roller xywh {232 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Roller]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Spinner"} callback type_make_cb tooltip Spinner xywh {257 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Spinner]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Value_Input"} callback type_make_cb tooltip {Value Input} xywh {282 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Value_Input]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } Fl_Group {} { @@ -325,42 +325,42 @@ else callback type_make_cb tooltip Input xywh {341 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Input]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Output"} callback type_make_cb tooltip Output xywh {366 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Output]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Text_Editor"} callback type_make_cb tooltip {Text Edit} xywh {341 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Text_Editor]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Text_Display"} callback type_make_cb tooltip {Text Display} xywh {366 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Text_Display]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_File_Input"} callback type_make_cb tooltip {File Input} xywh {341 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::File_Input]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Terminal"} callback type_make_cb tooltip Terminal xywh {366 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Terminal]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } Fl_Group {} { @@ -372,56 +372,56 @@ else callback type_make_cb tooltip {Input Choice} xywh {400 22 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Input_Choice]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"menuitem"} callback type_make_cb tooltip {Menu Item} xywh {425 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Menu_Item]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Menu_Bar"} callback type_make_cb tooltip {Menu Bar} xywh {450 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Menu_Bar]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Menu_Button"} callback type_make_cb tooltip {Menu Button} xywh {400 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Menu_Button]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"checkmenuitem"} callback type_make_cb tooltip {Checkbox Menu Item} xywh {425 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Checkbox_Menu_Item]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"submenu"} callback type_make_cb tooltip {Sub Menu} xywh {450 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Submenu]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Choice"} callback type_make_cb tooltip Choice xywh {400 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Choice]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"radiomenuitem"} callback type_make_cb tooltip {Radio Menu Item} xywh {425 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Radio_Menu_Item]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } Fl_Group {} { @@ -433,42 +433,42 @@ else callback type_make_cb tooltip Browser xywh {484 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Browser]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Tree"} callback type_make_cb tooltip Tree xywh {509 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Tree]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Check_Browser"} callback type_make_cb tooltip {Check Browser} xywh {484 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Check_Browser]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Help_View"} callback type_make_cb tooltip {Help Browser} xywh {509 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Help_View]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_File_Browser"} callback type_make_cb tooltip {File Browser} xywh {484 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::File_Browser]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Table"} callback type_make_cb tooltip Table xywh {509 71 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Table]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } Fl_Group {} { @@ -480,21 +480,21 @@ else callback type_make_cb tooltip Box xywh {542 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Box]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Clock"} callback type_make_cb tooltip Clock xywh {567 21 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Clock]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } Fl_Button {} { user_data {"Fl_Progress"} callback type_make_cb tooltip Progress xywh {542 46 24 24} box THIN_UP_BOX code0 {o->image(pixmap[(int)Type::Progress]);} - class {fld::widget::Bin_Button} + class {fluid::widget::Bin_Button} } } } diff --git a/fluid/panels/settings_panel.cxx b/fluid/panels/settings_panel.cxx index d90aa46c4..df9eede4f 100644 --- a/fluid/panels/settings_panel.cxx +++ b/fluid/panels/settings_panel.cxx @@ -24,7 +24,7 @@ #include #include "../src/flstring.h" #include -using namespace fld::widget; +using namespace fluid::widget; void scheme_cb(Fl_Scheme_Choice *, void *); int w_settings_shell_list_selected; @@ -543,8 +543,8 @@ Fl_Menu_Button* w_layout_menu = (Fl_Menu_Button*)nullptr; static void cb_w_layout_menu(Fl_Menu_Button*, void* v) { if (v == LOAD) { - fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; - if (suite.storage_ == fld::Tool_Store::INTERNAL) { + fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; + if (suite.storage_ == fluid::Tool_Store::INTERNAL) { w_layout_menu_rename->deactivate(); for (int i=1; i<4; i++) w_layout_menu_storage[i]->deactivate(); w_layout_menu_delete->deactivate(); @@ -570,26 +570,26 @@ static void cb_w_layout_menu_rename(Fl_Menu_*, void*) { } static void cb_w_layout_menu_storage(Fl_Menu_*, void*) { - fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; - suite.storage(fld::Tool_Store::INTERNAL); + fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; + suite.storage(fluid::Tool_Store::INTERNAL); Fluid.layout_list.update_dialogs(); } static void cb_w_layout_menu_storage1(Fl_Menu_*, void*) { - fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; - suite.storage(fld::Tool_Store::USER); + fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; + suite.storage(fluid::Tool_Store::USER); Fluid.layout_list.update_dialogs(); } static void cb_w_layout_menu_storage2(Fl_Menu_*, void*) { - fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; - suite.storage(fld::Tool_Store::PROJECT); + fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; + suite.storage(fluid::Tool_Store::PROJECT); Fluid.layout_list.update_dialogs(); } static void cb_w_layout_menu_storage3(Fl_Menu_*, void*) { - fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; - suite.storage(fld::Tool_Store::FILE); + fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; + suite.storage(fluid::Tool_Store::FILE); Fluid.layout_list.update_dialogs(); } @@ -895,9 +895,9 @@ static void cb_w_settings_shell_list(Fl_Browser* o, void* v) { for (int i=0; ilist_size; i++) { Fd_Shell_Command *cmd = g_shell_config->list[i]; o->add(cmd->name.c_str()); - if (cmd->storage == fld::Tool_Store::USER) + if (cmd->storage == fluid::Tool_Store::USER) o->icon(i+1, w_settings_shell_fd_user->image()); - else if (cmd->storage == fld::Tool_Store::PROJECT) + else if (cmd->storage == fluid::Tool_Store::PROJECT) o->icon(i+1, w_settings_shell_fd_project->image()); } } @@ -930,9 +930,9 @@ static void cb_a(Fl_Button*, void* v) { w_settings_shell_list->insert(selected+1, cmd->name.c_str()); w_settings_shell_list->deselect(); w_settings_shell_list->value(selected+1); - if (cmd->storage == fld::Tool_Store::USER) { + if (cmd->storage == fluid::Tool_Store::USER) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image()); - } else if (cmd->storage == fld::Tool_Store::PROJECT) { + } else if (cmd->storage == fluid::Tool_Store::PROJECT) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image()); Fluid.proj.set_modflag(1); } @@ -960,9 +960,9 @@ static void cb_w_settings_shell_dup(Fl_Button* o, void* v) { w_settings_shell_list->insert(selected+1, cmd->name.c_str()); w_settings_shell_list->deselect(); w_settings_shell_list->value(selected+1); - if (cmd->storage == fld::Tool_Store::USER) { + if (cmd->storage == fluid::Tool_Store::USER) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image()); - } else if (cmd->storage == fld::Tool_Store::PROJECT) { + } else if (cmd->storage == fluid::Tool_Store::PROJECT) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image()); Fluid.proj.set_modflag(1); } @@ -988,7 +988,7 @@ static void cb_w_settings_shell_remove(Fl_Button* o, void* v) { int ret = fl_choice("Delete the shell command\n\"%s\"?\n\nThis can not be undone.", "Delete", "Cancel", nullptr, g_shell_config->list[selected-1]->name.c_str()); if (ret==1) return; - if (g_shell_config->at(selected-1)->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (g_shell_config->at(selected-1)->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); g_shell_config->remove(selected-1); w_settings_shell_list->remove(selected); if (selected <= w_settings_shell_list->size()) @@ -1073,7 +1073,7 @@ static void cb_Name(Fl_Input* o, void* v) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->name = o->value(); w_settings_shell_list->text(selected, o->value()); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1091,7 +1091,7 @@ static void cb_Menu(Fl_Input* o, void* v) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->label = o->value(); cmd->update_shell_menu(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1114,7 +1114,7 @@ static void cb_Shortcut(Fl_Shortcut_Button* o, void* v) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->shortcut = o->value(); cmd->update_shell_menu(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1123,30 +1123,30 @@ static void cb_Store(Fl_Choice* o, void* v) { int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { - fld::Tool_Store ts = g_shell_config->list[selected-1]->storage; + fluid::Tool_Store ts = g_shell_config->list[selected-1]->storage; o->value(o->find_item_with_argument((long)ts)); } else { - o->value(o->find_item_with_argument((long)fld::Tool_Store::USER)); + o->value(o->find_item_with_argument((long)fluid::Tool_Store::USER)); } } else { if (selected) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; - fld::Tool_Store ts = (fld::Tool_Store)(o->mvalue()->argument()); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + fluid::Tool_Store ts = (fluid::Tool_Store)(o->mvalue()->argument()); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); cmd->storage = ts; //w_settings_shell_list->text(selected, cmd->name.c_str()); - if (cmd->storage == fld::Tool_Store::USER) + if (cmd->storage == fluid::Tool_Store::USER) w_settings_shell_list->icon(selected, w_settings_shell_fd_user->image()); - else if (cmd->storage == fld::Tool_Store::PROJECT) + else if (cmd->storage == fluid::Tool_Store::PROJECT) w_settings_shell_list->icon(selected, w_settings_shell_fd_project->image()); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } Fl_Menu_Item menu_Store[] = { - {"@fd_user User Setting", 0, nullptr, (void*)(fld::Tool_Store::USER), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0 }, - {"@fd_project Project File", 0, nullptr, (void*)(fld::Tool_Store::PROJECT), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0 }, + {"@fd_user User Setting", 0, nullptr, (void*)(fluid::Tool_Store::USER), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0 }, + {"@fd_project Project File", 0, nullptr, (void*)(fluid::Tool_Store::PROJECT), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0 }, { nullptr, 0, nullptr, nullptr, 0, 0, 0, 0, 0 } }; @@ -1165,7 +1165,7 @@ static void cb_Condition(Fl_Choice* o, void* v) { int cond = (int)(o->mvalue()->argument()); cmd->condition = cond; g_shell_config->rebuild_shell_menu(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1202,7 +1202,7 @@ static void cb_w_settings_shell_command(Fl_Text_Editor* o, void* v) { if (selected) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->command = o->buffer()->text(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1281,7 +1281,7 @@ static void cb_save(Fl_Check_Button* o, void* v) { } else { cmd->flags &= ~Fd_Shell_Command::SAVE_PROJECT; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1303,7 +1303,7 @@ static void cb_save1(Fl_Check_Button* o, void* v) { } else { cmd->flags &= ~Fd_Shell_Command::SAVE_SOURCECODE; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1325,7 +1325,7 @@ static void cb_save2(Fl_Check_Button* o, void* v) { } else { cmd->flags &= ~Fd_Shell_Command::SAVE_STRINGS; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1347,7 +1347,7 @@ static void cb_show(Fl_Check_Button* o, void* v) { } else { cmd->flags &= ~Fd_Shell_Command::DONT_SHOW_TERMINAL; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1369,7 +1369,7 @@ static void cb_clear(Fl_Check_Button* o, void* v) { } else { cmd->flags &= ~Fd_Shell_Command::CLEAR_TERMINAL; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -1391,7 +1391,7 @@ static void cb_clear1(Fl_Check_Button* o, void* v) { } else { cmd->flags &= ~Fd_Shell_Command::CLEAR_HISTORY; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } } } @@ -2465,8 +2465,8 @@ static void cb_Reset(Fl_Button* o, void* v) { static void cb_Close(Fl_Button*, void*) { if (g_shell_config) - g_shell_config->write(Fluid.preferences, fld::Tool_Store::USER); - Fluid.layout_list.write(Fluid.preferences, fld::Tool_Store::USER); + g_shell_config->write(Fluid.preferences, fluid::Tool_Store::USER); + Fluid.layout_list.write(Fluid.preferences, fluid::Tool_Store::USER); settings_window->hide(); } diff --git a/fluid/panels/settings_panel.fl b/fluid/panels/settings_panel.fl index 483bb650e..6078442ac 100644 --- a/fluid/panels/settings_panel.fl +++ b/fluid/panels/settings_panel.fl @@ -98,7 +98,7 @@ decl {\#include "../src/flstring.h"} {private global decl {\#include } {private global } -decl {using namespace fld::widget;} {private global +decl {using namespace fluid::widget;} {private global } decl {extern struct Fl_Menu_Item *dbmanager_item;} {public local @@ -512,8 +512,8 @@ Fluid.layout_list.update_dialogs();} } Fl_Menu_Button w_layout_menu { callback {if (v == LOAD) { - fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; - if (suite.storage_ == fld::Tool_Store::INTERNAL) { + fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; + if (suite.storage_ == fluid::Tool_Store::INTERNAL) { w_layout_menu_rename->deactivate(); for (int i=1; i<4; i++) w_layout_menu_storage[i]->deactivate(); w_layout_menu_delete->deactivate(); @@ -541,29 +541,29 @@ Fluid.layout_list.update_dialogs();} } MenuItem {w_layout_menu_storage[0]} { label {@fd_beaker FLUID Built-In} - callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; -suite.storage(fld::Tool_Store::INTERNAL); + callback {fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; +suite.storage(fluid::Tool_Store::INTERNAL); Fluid.layout_list.update_dialogs();} xywh {0 0 31 20} type Radio deactivate } MenuItem {w_layout_menu_storage[1]} { label {@fd_user User Preference} - callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; -suite.storage(fld::Tool_Store::USER); + callback {fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; +suite.storage(fluid::Tool_Store::USER); Fluid.layout_list.update_dialogs();} xywh {0 0 31 20} type Radio } MenuItem {w_layout_menu_storage[2]} { label {@fd_project Store in .fl Project File} - callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; -suite.storage(fld::Tool_Store::PROJECT); + callback {fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; +suite.storage(fluid::Tool_Store::PROJECT); Fluid.layout_list.update_dialogs();} xywh {0 0 31 20} type Radio } MenuItem {w_layout_menu_storage[3]} { label {@fd_file Store in External File} - callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; -suite.storage(fld::Tool_Store::FILE); + callback {fluid::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()]; +suite.storage(fluid::Tool_Store::FILE); Fluid.layout_list.update_dialogs();} xywh {0 0 31 20} type Radio divider } @@ -932,9 +932,9 @@ list:} for (int i=0; ilist_size; i++) { Fd_Shell_Command *cmd = g_shell_config->list[i]; o->add(cmd->name.c_str()); - if (cmd->storage == fld::Tool_Store::USER) + if (cmd->storage == fluid::Tool_Store::USER) o->icon(i+1, w_settings_shell_fd_user->image()); - else if (cmd->storage == fld::Tool_Store::PROJECT) + else if (cmd->storage == fluid::Tool_Store::PROJECT) o->icon(i+1, w_settings_shell_fd_project->image()); } } @@ -966,9 +966,9 @@ list:} w_settings_shell_list->insert(selected+1, cmd->name.c_str()); w_settings_shell_list->deselect(); w_settings_shell_list->value(selected+1); - if (cmd->storage == fld::Tool_Store::USER) { + if (cmd->storage == fluid::Tool_Store::USER) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image()); - } else if (cmd->storage == fld::Tool_Store::PROJECT) { + } else if (cmd->storage == fluid::Tool_Store::PROJECT) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image()); Fluid.proj.set_modflag(1); } @@ -995,9 +995,9 @@ if (v==LOAD) { w_settings_shell_list->insert(selected+1, cmd->name.c_str()); w_settings_shell_list->deselect(); w_settings_shell_list->value(selected+1); - if (cmd->storage == fld::Tool_Store::USER) { + if (cmd->storage == fluid::Tool_Store::USER) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image()); - } else if (cmd->storage == fld::Tool_Store::PROJECT) { + } else if (cmd->storage == fluid::Tool_Store::PROJECT) { w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image()); Fluid.proj.set_modflag(1); } @@ -1022,7 +1022,7 @@ if (v==LOAD) { int ret = fl_choice("Delete the shell command\\n\\"%s\\"?\\n\\nThis can not be undone.", "Delete", "Cancel", nullptr, g_shell_config->list[selected-1]->name.c_str()); if (ret==1) return; - if (g_shell_config->at(selected-1)->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (g_shell_config->at(selected-1)->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); g_shell_config->remove(selected-1); w_settings_shell_list->remove(selected); if (selected <= w_settings_shell_list->size()) @@ -1124,7 +1124,7 @@ if (v == LOAD) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->name = o->value(); w_settings_shell_list->text(selected, o->value()); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {file the shell command under this name in the shell command list} xywh {110 246 230 20} labelfont 1 labelsize 12 when 13 textfont 4 textsize 12 @@ -1143,7 +1143,7 @@ if (v == LOAD) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->label = o->value(); cmd->update_shell_menu(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {label text for the Shell menu in the main menu bar} xywh {110 272 230 20} labelfont 1 labelsize 12 textfont 4 textsize 12 @@ -1167,7 +1167,7 @@ if (v == LOAD) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->shortcut = o->value(); cmd->update_shell_menu(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {an optional keyboard shortcut to run this shell command} xywh {110 297 130 20} labelsize 12 align 16 @@ -1179,35 +1179,35 @@ if (v == LOAD) { callback {int selected = w_settings_shell_list_selected; if (v == LOAD) { if (selected) { - fld::Tool_Store ts = g_shell_config->list[selected-1]->storage; + fluid::Tool_Store ts = g_shell_config->list[selected-1]->storage; o->value(o->find_item_with_argument((long)ts)); } else { - o->value(o->find_item_with_argument((long)fld::Tool_Store::USER)); + o->value(o->find_item_with_argument((long)fluid::Tool_Store::USER)); } } else { if (selected) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; - fld::Tool_Store ts = (fld::Tool_Store)(o->mvalue()->argument()); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + fluid::Tool_Store ts = (fluid::Tool_Store)(o->mvalue()->argument()); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); cmd->storage = ts; //w_settings_shell_list->text(selected, cmd->name.c_str()); - if (cmd->storage == fld::Tool_Store::USER) + if (cmd->storage == fluid::Tool_Store::USER) w_settings_shell_list->icon(selected, w_settings_shell_fd_user->image()); - else if (cmd->storage == fld::Tool_Store::PROJECT) + else if (cmd->storage == fluid::Tool_Store::PROJECT) w_settings_shell_list->icon(selected, w_settings_shell_fd_project->image()); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} open tooltip {store this shell command as a user setting or save it with the .fl project file} xywh {110 322 130 20} down_box BORDER_BOX labelfont 1 labelsize 12 textsize 12 } { MenuItem {} { label {@fd_user User Setting} - user_data {fld::Tool_Store::USER} user_data_type long + user_data {fluid::Tool_Store::USER} user_data_type long xywh {0 0 100 20} labelsize 12 } MenuItem {} { label {@fd_project Project File} - user_data {fld::Tool_Store::PROJECT} user_data_type long + user_data {fluid::Tool_Store::PROJECT} user_data_type long xywh {0 0 100 20} labelsize 12 } } @@ -1227,7 +1227,7 @@ if (v == LOAD) { int cond = (int)(o->mvalue()->argument()); cmd->condition = cond; g_shell_config->rebuild_shell_menu(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} open tooltip {add this command to the main menu bar only if this condition is true} xywh {110 348 130 20} down_box BORDER_BOX labelfont 1 labelsize 12 textsize 12 @@ -1293,7 +1293,7 @@ if (v == LOAD) { if (selected) { Fd_Shell_Command *cmd = g_shell_config->list[selected-1]; cmd->command = o->buffer()->text(); - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} xywh {110 373 208 80} labelfont 1 labelsize 12 align 4 textfont 4 textsize 12 resizable @@ -1414,7 +1414,7 @@ if (v == LOAD) { } else { cmd->flags &= ~Fd_Shell_Command::SAVE_PROJECT; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {save the project to the .fl file before running the command} xywh {110 458 110 20} down_box DOWN_BOX labelsize 12 @@ -1437,7 +1437,7 @@ if (v == LOAD) { } else { cmd->flags &= ~Fd_Shell_Command::SAVE_SOURCECODE; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {generate the source code and header file before running the command} xywh {110 478 110 19} down_box DOWN_BOX labelsize 12 @@ -1460,7 +1460,7 @@ if (v == LOAD) { } else { cmd->flags &= ~Fd_Shell_Command::SAVE_STRINGS; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {save the internationalisation strings before running the command} xywh {110 498 110 20} down_box DOWN_BOX labelsize 12 @@ -1483,7 +1483,7 @@ if (v == LOAD) { } else { cmd->flags &= ~Fd_Shell_Command::DONT_SHOW_TERMINAL; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {show the terminal window when launching this script} xywh {229 458 106 20} down_box DOWN_BOX labelsize 12 @@ -1506,7 +1506,7 @@ if (v == LOAD) { } else { cmd->flags &= ~Fd_Shell_Command::CLEAR_TERMINAL; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {clear the teminal window before running this script} xywh {229 478 106 19} down_box DOWN_BOX labelsize 12 @@ -1529,7 +1529,7 @@ if (v == LOAD) { } else { cmd->flags &= ~Fd_Shell_Command::CLEAR_HISTORY; } - if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); + if (cmd->storage == fluid::Tool_Store::PROJECT) Fluid.proj.set_modflag(1); } }} tooltip {clear the teminal history in the terminal window} xywh {229 498 106 19} down_box DOWN_BOX labelsize 12 @@ -1880,8 +1880,8 @@ widget_browser->save_prefs();} Fl_Button {} { label Close callback {if (g_shell_config) - g_shell_config->write(Fluid.preferences, fld::Tool_Store::USER); -Fluid.layout_list.write(Fluid.preferences, fld::Tool_Store::USER); + g_shell_config->write(Fluid.preferences, fluid::Tool_Store::USER); +Fluid.layout_list.write(Fluid.preferences, fluid::Tool_Store::USER); settings_window->hide();} tooltip {Close this dialog.} xywh {230 550 120 25} } diff --git a/fluid/panels/widget_panel.cxx b/fluid/panels/widget_panel.cxx index 57b196f53..6da87951e 100644 --- a/fluid/panels/widget_panel.cxx +++ b/fluid/panels/widget_panel.cxx @@ -44,7 +44,7 @@ extern void color_common(Fl_Color c); extern void color2_common(Fl_Color c); extern void textcolor_common(Fl_Color c); extern int widget_i; -extern fld::widget::Formula_Input_Vars widget_vars[]; +extern fluid::widget::Formula_Input_Vars widget_vars[]; extern int numselected; extern Fl_Menu_Item boxmenu[]; extern int haderror; @@ -123,9 +123,9 @@ static void cb_image_panel_data(Fl_Box* o, void* v) { //fl ▲ ----------=~-=-~-~---~-----------~=--~~~-~~=--~-=--=-= ▲ fl// } -fld::widget::Formula_Input* image_panel_imagew = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* image_panel_imagew = (fluid::widget::Formula_Input*)nullptr; -static void cb_image_panel_imagew(fld::widget::Formula_Input* o, void* v) { +static void cb_image_panel_imagew(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ---==-=~~~~~-~-=~=-~~- ▼ fl// if (v == LOAD) { if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) { @@ -155,9 +155,9 @@ static void cb_image_panel_imagew(fld::widget::Formula_Input* o, void* v) { //fl ▲ ----------~==~=~-~~=~~------------=-~-=-=~~-~==-=~~-~= ▲ fl// } -fld::widget::Formula_Input* image_panel_imageh = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* image_panel_imageh = (fluid::widget::Formula_Input*)nullptr; -static void cb_image_panel_imageh(fld::widget::Formula_Input* o, void* v) { +static void cb_image_panel_imageh(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ~~~=----~=~-~=~~--=~~- ▼ fl// if (v == LOAD) { if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) { @@ -263,9 +263,9 @@ static void cb_image_panel_dedata(Fl_Box* o, void* v) { //fl ▲ ----------~=~=-~~---=~------------~~=-~~=-=-=~=~--=--~ ▲ fl// } -fld::widget::Formula_Input* image_panel_deimagew = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* image_panel_deimagew = (fluid::widget::Formula_Input*)nullptr; -static void cb_image_panel_deimagew(fld::widget::Formula_Input* o, void* v) { +static void cb_image_panel_deimagew(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ---=~~~~~=-=-~=~~=--=~ ▼ fl// if (v == LOAD) { if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) { @@ -295,9 +295,9 @@ static void cb_image_panel_deimagew(fld::widget::Formula_Input* o, void* v) { //fl ▲ ----------~=-~--=-=~=~----------~-=-~=--=-~-~---~-~=~- ▲ fl// } -fld::widget::Formula_Input* image_panel_deimageh = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* image_panel_deimageh = (fluid::widget::Formula_Input*)nullptr; -static void cb_image_panel_deimageh(fld::widget::Formula_Input* o, void* v) { +static void cb_image_panel_deimageh(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback -----==-~==~=-=~=--~-= ▼ fl// if (v == LOAD) { if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) { @@ -407,7 +407,7 @@ Fl_Double_Window* make_image_panel() { } // Fl_Box* image_panel_data { Fl_Group* o = new Fl_Group(75, 75, 170, 20); o->callback((Fl_Callback*)propagate_load); - { image_panel_imagew = new fld::widget::Formula_Input(75, 75, 55, 20, "Width:"); + { image_panel_imagew = new fluid::widget::Formula_Input(75, 75, 55, 20, "Width:"); image_panel_imagew->tooltip("Scale image to this width in pixel units"); image_panel_imagew->box(FL_DOWN_BOX); image_panel_imagew->color(FL_BACKGROUND2_COLOR); @@ -420,8 +420,8 @@ Fl_Double_Window* make_image_panel() { image_panel_imagew->callback((Fl_Callback*)cb_image_panel_imagew); image_panel_imagew->align(Fl_Align(FL_ALIGN_TOP_LEFT)); image_panel_imagew->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* image_panel_imagew - { image_panel_imageh = new fld::widget::Formula_Input(135, 75, 55, 20, "Height:"); + } // fluid::widget::Formula_Input* image_panel_imagew + { image_panel_imageh = new fluid::widget::Formula_Input(135, 75, 55, 20, "Height:"); image_panel_imageh->tooltip("Scale image to this height in pixel units"); image_panel_imageh->box(FL_DOWN_BOX); image_panel_imageh->color(FL_BACKGROUND2_COLOR); @@ -434,7 +434,7 @@ Fl_Double_Window* make_image_panel() { image_panel_imageh->callback((Fl_Callback*)cb_image_panel_imageh); image_panel_imageh->align(Fl_Align(FL_ALIGN_TOP_LEFT)); image_panel_imageh->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* image_panel_imageh + } // fluid::widget::Formula_Input* image_panel_imageh { Fl_Button* o = new Fl_Button(195, 75, 50, 20, "Reset"); o->tooltip("Reset scale to original size"); o->labelsize(11); @@ -483,7 +483,7 @@ Fl_Double_Window* make_image_panel() { } // Fl_Box* image_panel_dedata { Fl_Group* o = new Fl_Group(75, 215, 170, 20); o->callback((Fl_Callback*)propagate_load); - { image_panel_deimagew = new fld::widget::Formula_Input(75, 215, 55, 20, "Width:"); + { image_panel_deimagew = new fluid::widget::Formula_Input(75, 215, 55, 20, "Width:"); image_panel_deimagew->tooltip("Scale image to this width in pixel units"); image_panel_deimagew->box(FL_DOWN_BOX); image_panel_deimagew->color(FL_BACKGROUND2_COLOR); @@ -496,8 +496,8 @@ Fl_Double_Window* make_image_panel() { image_panel_deimagew->callback((Fl_Callback*)cb_image_panel_deimagew); image_panel_deimagew->align(Fl_Align(FL_ALIGN_TOP_LEFT)); image_panel_deimagew->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* image_panel_deimagew - { image_panel_deimageh = new fld::widget::Formula_Input(135, 215, 55, 20, "Height:"); + } // fluid::widget::Formula_Input* image_panel_deimagew + { image_panel_deimageh = new fluid::widget::Formula_Input(135, 215, 55, 20, "Height:"); image_panel_deimageh->tooltip("Scale image to this height in pixel units"); image_panel_deimageh->box(FL_DOWN_BOX); image_panel_deimageh->color(FL_BACKGROUND2_COLOR); @@ -510,7 +510,7 @@ Fl_Double_Window* make_image_panel() { image_panel_deimageh->callback((Fl_Callback*)cb_image_panel_deimageh); image_panel_deimageh->align(Fl_Align(FL_ALIGN_TOP_LEFT)); image_panel_deimageh->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* image_panel_deimageh + } // fluid::widget::Formula_Input* image_panel_deimageh { Fl_Button* o = new Fl_Button(195, 215, 50, 20, "Reset"); o->tooltip("Reset scale to original size"); o->labelsize(11); @@ -750,9 +750,9 @@ Fl_Menu_Item menu_1[] = { { nullptr, 0, nullptr, nullptr, 0, 0, 0, 0, 0 } }; -fld::widget::Formula_Input* widget_x_input = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* widget_x_input = (fluid::widget::Formula_Input*)nullptr; -static void cb_widget_x_input(fld::widget::Formula_Input* o, void* v) { +static void cb_widget_x_input(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ~~~--=~-~=-~~--~~=~~~= ▼ fl// if (v == LOAD) { if (current_widget->is_true_widget()) { @@ -784,9 +784,9 @@ static void cb_widget_x_input(fld::widget::Formula_Input* o, void* v) { //fl ▲ ----------=~=~--~~-=-~----------~~=~=--~~~-=~=~-=~~==- ▲ fl// } -fld::widget::Formula_Input* widget_y_input = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* widget_y_input = (fluid::widget::Formula_Input*)nullptr; -static void cb_widget_y_input(fld::widget::Formula_Input* o, void* v) { +static void cb_widget_y_input(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ---==~=~~~~=-=---=--~= ▼ fl// if (v == LOAD) { if (current_widget->is_true_widget()) { @@ -817,9 +817,9 @@ static void cb_widget_y_input(fld::widget::Formula_Input* o, void* v) { //fl ▲ ----------~==--=~=--=-----------~~=~--~~=~-~---=~-=-~= ▲ fl// } -fld::widget::Formula_Input* widget_w_input = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* widget_w_input = (fluid::widget::Formula_Input*)nullptr; -static void cb_widget_w_input(fld::widget::Formula_Input* o, void* v) { +static void cb_widget_w_input(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ~~~=---=-=-~-==----=~= ▼ fl// if (v == LOAD) { if (current_widget->is_true_widget()) { @@ -850,9 +850,9 @@ static void cb_widget_w_input(fld::widget::Formula_Input* o, void* v) { //fl ▲ ----------~=~-=~~--~------------~--~-==-~~~~~==-=--=-= ▲ fl// } -fld::widget::Formula_Input* widget_h_input = (fld::widget::Formula_Input*)nullptr; +fluid::widget::Formula_Input* widget_h_input = (fluid::widget::Formula_Input*)nullptr; -static void cb_widget_h_input(fld::widget::Formula_Input* o, void* v) { +static void cb_widget_h_input(fluid::widget::Formula_Input* o, void* v) { //fl ▼ ---------------------- callback ~-=~~-~-=~=--=-~=-~==~ ▼ fl// if (v == LOAD) { if (current_widget->is_true_widget()) { @@ -2372,9 +2372,9 @@ static void cb_wComment(Fl_Text_Editor* o, void* v) { //fl ▲ ----------=~---~~-=--~----------~~-~--=~~~-~~==~~=~~~- ▲ fl// } -fld::widget::Code_Editor* wCallback = (fld::widget::Code_Editor*)nullptr; +fluid::widget::Code_Editor* wCallback = (fluid::widget::Code_Editor*)nullptr; -static void cb_wCallback(fld::widget::Code_Editor* o, void* v) { +static void cb_wCallback(fluid::widget::Code_Editor* o, void* v) { //fl ▼ ---------------------- callback ~-~=-==-~==~-=~~-=--=~ ▼ fl// if (v == LOAD) { const char *cbtext = current_widget->callback(); @@ -3234,7 +3234,7 @@ static void cb_1b(Fl_Tile* o, void* v) { //fl ▲ ----------=~-=~--~~=~=-----------~~----=--~=~~-~-----= ▲ fl// } -static void cb_Declaration(fld::widget::Code_Editor* o, void* v) { +static void cb_Declaration(fluid::widget::Code_Editor* o, void* v) { //fl ▼ ---------------------- callback ---==--~~-=-=-~=----=- ▼ fl// if (!current_node || !current_node->is_a(Type::Decl)) return; Decl_Node* nd = (Decl_Node*)current_node; @@ -3358,7 +3358,7 @@ static void cb_code_tabs(Fl_Tabs* o, void* v) { Fl_Group* code_tabs_main = (Fl_Group*)nullptr; -static void cb_1c(fld::widget::Code_Editor* o, void* v) { +static void cb_1c(fluid::widget::Code_Editor* o, void* v) { //fl ▼ ---------------------- callback ~~-==-=~~--~=~=~-~~-~- ▼ fl// if (!current_node || !current_node->is_a(Type::Code)) return; Code_Node* nd = (Code_Node*)current_node; @@ -3481,7 +3481,7 @@ static void cb_1f(Fl_Tile* o, void* v) { //fl ▲ ----------=~~=~~-~---~-----------~~----=--~=~~-~-----= ▲ fl// } -static void cb_Function(fld::widget::Code_Editor* o, void* v) { +static void cb_Function(fluid::widget::Code_Editor* o, void* v) { //fl ▼ ---------------------- callback --=~=----~=~~-=~-==--~ ▼ fl// if (!current_node || !current_node->is_a(Type::Function)) return; Function_Node* nd = (Function_Node*)current_node; @@ -3505,7 +3505,7 @@ static void cb_Function(fld::widget::Code_Editor* o, void* v) { //fl ▲ ----------=~=~=-=--~=~-----------~=-=~~~~~-=~~~=-=-~-- ▲ fl// } -static void cb_Return(fld::widget::Code_Editor* o, void* v) { +static void cb_Return(fluid::widget::Code_Editor* o, void* v) { //fl ▼ ---------------------- callback -~=--~-~=~=~~~---=~~=~ ▼ fl// if (!current_node || !current_node->is_a(Type::Function)) return; Function_Node* nd = (Function_Node*)current_node; @@ -3730,7 +3730,7 @@ Fl_Double_Window* make_widget_panel() { o->labelsize(11); o->callback((Fl_Callback*)position_group_cb); o->align(Fl_Align(FL_ALIGN_LEFT)); - { widget_x_input = new fld::widget::Formula_Input(95, 150, 55, 20, "X:"); + { widget_x_input = new fluid::widget::Formula_Input(95, 150, 55, 20, "X:"); widget_x_input->tooltip("The X position of the widget as a number or formula.\nFormulas can be simple " "math, including the variables\nx, px, sx, cx, and i"); widget_x_input->box(FL_DOWN_BOX); @@ -3744,8 +3744,8 @@ Fl_Double_Window* make_widget_panel() { widget_x_input->callback((Fl_Callback*)cb_widget_x_input); widget_x_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_x_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_x_input - { widget_y_input = new fld::widget::Formula_Input(155, 150, 55, 20, "Y:"); + } // fluid::widget::Formula_Input* widget_x_input + { widget_y_input = new fluid::widget::Formula_Input(155, 150, 55, 20, "Y:"); widget_y_input->tooltip("The Y position of the widget as a number or formula.\nFormulas can be simple " "math, including the variables\ny, py, sy, cy, and i"); widget_y_input->box(FL_DOWN_BOX); @@ -3759,8 +3759,8 @@ Fl_Double_Window* make_widget_panel() { widget_y_input->callback((Fl_Callback*)cb_widget_y_input); widget_y_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_y_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_y_input - { widget_w_input = new fld::widget::Formula_Input(215, 150, 55, 20, "Width:"); + } // fluid::widget::Formula_Input* widget_y_input + { widget_w_input = new fluid::widget::Formula_Input(215, 150, 55, 20, "Width:"); widget_w_input->tooltip("The width of the widget as a number or formula.\nFormulas can be simple math," " including the variables\nw, pw, sw, cw, and i"); widget_w_input->box(FL_DOWN_BOX); @@ -3774,8 +3774,8 @@ Fl_Double_Window* make_widget_panel() { widget_w_input->callback((Fl_Callback*)cb_widget_w_input); widget_w_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_w_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_w_input - { widget_h_input = new fld::widget::Formula_Input(275, 150, 55, 20, "Height:"); + } // fluid::widget::Formula_Input* widget_w_input + { widget_h_input = new fluid::widget::Formula_Input(275, 150, 55, 20, "Height:"); widget_h_input->tooltip("The height of the widget as a number or formula.\nFormulas can be simple math" ", including the variables\nh, ph, sh, ch, and i"); widget_h_input->box(FL_DOWN_BOX); @@ -3789,7 +3789,7 @@ Fl_Double_Window* make_widget_panel() { widget_h_input->callback((Fl_Callback*)cb_widget_h_input); widget_h_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_h_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_h_input + } // fluid::widget::Formula_Input* widget_h_input { Fl_Choice* o = new Fl_Choice(335, 150, 64, 20, "Children:"); o->tooltip("When instantiating a widget class, the children can either be fixed in their " "original position, automatically be repositioned, or both repsositioned and re" @@ -4393,7 +4393,7 @@ Fl_Double_Window* make_widget_panel() { } // Fl_Group* o { Fl_Group* o = new Fl_Group(95, 223, 310, 82); o->box(FL_FLAT_BOX); - { wCallback = new fld::widget::Code_Editor(95, 225, 310, 80, "Callback:"); + { wCallback = new fluid::widget::Code_Editor(95, 225, 310, 80, "Callback:"); wCallback->tooltip("The callback function or code for the widget. Use the variable name \'o\' to " "access the Widget pointer and \'v\' to access the user value."); wCallback->box(FL_DOWN_BOX); @@ -4409,7 +4409,7 @@ Fl_Double_Window* make_widget_panel() { wCallback->align(Fl_Align(FL_ALIGN_LEFT)); wCallback->when(FL_WHEN_RELEASE); Fl_Group::current()->resizable(wCallback); - } // fld::widget::Code_Editor* wCallback + } // fluid::widget::Code_Editor* wCallback o->end(); } // Fl_Group* o o->end(); @@ -4852,7 +4852,7 @@ Fl_Double_Window* make_widget_panel() { o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { fld::widget::Code_Editor* o = new fld::widget::Code_Editor(95, 75, 310, 100, "Declaration:"); + { fluid::widget::Code_Editor* o = new fluid::widget::Code_Editor(95, 75, 310, 100, "Declaration:"); o->tooltip("a declaration: `int x;`, an external symbol: `extern int foo();`,\na `#` dire" "ctive: `#include `, a typedef `typedef char byte;`,\n or a `using` stat" "ement, etc."); @@ -4869,7 +4869,7 @@ Fl_Double_Window* make_widget_panel() { o->when(FL_WHEN_RELEASE); Fl_Group::current()->resizable(o); o->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // fld::widget::Code_Editor* o + } // fluid::widget::Code_Editor* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(15, 180, 390, 105); @@ -4951,7 +4951,7 @@ Fl_Double_Window* make_widget_panel() { { code_tabs_main = new Fl_Group(10, 30, 400, 330, "Code"); code_tabs_main->labelsize(11); code_tabs_main->callback((Fl_Callback*)propagate_load); - { fld::widget::Code_Editor* o = new fld::widget::Code_Editor(15, 40, 390, 315); + { fluid::widget::Code_Editor* o = new fluid::widget::Code_Editor(15, 40, 390, 315); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -4967,7 +4967,7 @@ Fl_Double_Window* make_widget_panel() { Fl_Group::current()->resizable(o); o->linenumber_width(60); o->linenumber_size(o->Fl_Text_Display::textsize()); - } // fld::widget::Code_Editor* o + } // fluid::widget::Code_Editor* o code_tabs_main->end(); Fl_Group::current()->resizable(code_tabs_main); } // Fl_Group* code_tabs_main @@ -5025,7 +5025,7 @@ o->linenumber_size(o->Fl_Text_Display::textsize()); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { fld::widget::Code_Editor* o = new fld::widget::Code_Editor(95, 100, 310, 50, "Function\nName and\nArgs:"); + { fluid::widget::Code_Editor* o = new fluid::widget::Code_Editor(95, 100, 310, 50, "Function\nName and\nArgs:"); o->tooltip("function name and args, or blank for `main(..)`"); o->box(FL_DOWN_FRAME); o->color(FL_BACKGROUND2_COLOR); @@ -5040,7 +5040,7 @@ o->linenumber_size(o->Fl_Text_Display::textsize()); o->when(FL_WHEN_RELEASE); Fl_Group::current()->resizable(o); o->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // fld::widget::Code_Editor* o + } // fluid::widget::Code_Editor* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(15, 155, 390, 60); @@ -5049,7 +5049,7 @@ o->linenumber_size(o->Fl_Text_Display::textsize()); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { fld::widget::Code_Editor* o = new fld::widget::Code_Editor(95, 160, 310, 50, "Return Type:"); + { fluid::widget::Code_Editor* o = new fluid::widget::Code_Editor(95, 160, 310, 50, "Return Type:"); o->tooltip("return type, or blank to return outermost widget"); o->box(FL_DOWN_FRAME); o->color(FL_BACKGROUND2_COLOR); @@ -5064,7 +5064,7 @@ o->linenumber_size(o->Fl_Text_Display::textsize()); o->when(FL_WHEN_RELEASE); Fl_Group::current()->resizable(o); o->add_key_binding(FL_Tab, 0, use_tab_navigation); - } // fld::widget::Code_Editor* o + } // fluid::widget::Code_Editor* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(15, 215, 390, 105); diff --git a/fluid/panels/widget_panel.fl b/fluid/panels/widget_panel.fl index 1881efc41..9f8871d82 100644 --- a/fluid/panels/widget_panel.fl +++ b/fluid/panels/widget_panel.fl @@ -102,7 +102,7 @@ extern void color_common(Fl_Color c); extern void color2_common(Fl_Color c); extern void textcolor_common(Fl_Color c); extern int widget_i; -extern fld::widget::Formula_Input_Vars widget_vars[];} {uid 81c9 private global +extern fluid::widget::Formula_Input_Vars widget_vars[];} {uid 81c9 private global } decl {extern int numselected; @@ -220,7 +220,7 @@ Function {make_image_panel()} {uid b832 if (mod) Fluid.proj.set_modflag(1); }} tooltip {Scale image to this width in pixel units} xywh {75 75 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input image_panel_imageh {uid e676 label {Height:} @@ -250,7 +250,7 @@ Function {make_image_panel()} {uid b832 if (mod) Fluid.proj.set_modflag(1); }} tooltip {Scale image to this height in pixel units} xywh {135 75 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Button {} {uid 4df5 label Reset @@ -370,7 +370,7 @@ Function {make_image_panel()} {uid b832 if (mod) Fluid.proj.set_modflag(1); }} tooltip {Scale image to this width in pixel units} xywh {75 215 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input image_panel_deimageh {uid c6c4 label {Height:} @@ -400,7 +400,7 @@ Function {make_image_panel()} {uid b832 if (mod) Fluid.proj.set_modflag(1); }} tooltip {Scale image to this height in pixel units} xywh {135 215 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Button {} {uid a381 label Reset @@ -857,7 +857,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t tooltip {The X position of the widget as a number or formula. Formulas can be simple math, including the variables x, px, sx, cx, and i} xywh {95 150 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input widget_y_input {uid 5985 label {Y:} @@ -890,7 +890,7 @@ x, px, sx, cx, and i} xywh {95 150 55 20} labelsize 11 align 5 textsize 11 tooltip {The Y position of the widget as a number or formula. Formulas can be simple math, including the variables y, py, sy, cy, and i} xywh {155 150 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input widget_w_input {uid 2e88 label {Width:} @@ -923,7 +923,7 @@ y, py, sy, cy, and i} xywh {155 150 55 20} labelsize 11 align 5 textsize 11 tooltip {The width of the widget as a number or formula. Formulas can be simple math, including the variables w, pw, sw, cw, and i} xywh {215 150 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input widget_h_input {uid 2382 label {Height:} @@ -956,7 +956,7 @@ w, pw, sw, cw, and i} xywh {215 150 55 20} labelsize 11 align 5 textsize 11 tooltip {The height of the widget as a number or formula. Formulas can be simple math, including the variables h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Choice {} {uid 4f6a label {Children:} @@ -2504,7 +2504,7 @@ wCallback->do_callback(wCallback, v);} open }} tooltip {The callback function or code for the widget. Use the variable name 'o' to access the Widget pointer and 'v' to access the user value.} xywh {95 225 310 80} box DOWN_BOX labelfont 1 labelsize 11 align 4 textfont 4 textsize 11 resizable code0 {\#include "widgets/Code_Editor.h"} - class {fld::widget::Code_Editor} + class {fluid::widget::Code_Editor} } } } @@ -3485,7 +3485,7 @@ a `\#` directive: `\#include `, a typedef `typedef char byte;`, or a `using` statement, etc.} xywh {95 75 310 100} labelfont 1 labelsize 11 align 132 textsize 11 resizable code0 {\#include "widgets/Code_Editor.h"} code1 {o->add_key_binding(FL_Tab, 0, use_tab_navigation);} - class {fld::widget::Code_Editor} + class {fluid::widget::Code_Editor} } } Fl_Group {} {uid 160e @@ -3624,7 +3624,7 @@ Code_Node* nd = (Code_Node*)current_node; code1 {\#include "widgets/Code_Editor.h"} code2 {o->linenumber_width(60); o->linenumber_size(o->Fl_Text_Display::textsize());} - class {fld::widget::Code_Editor} + class {fluid::widget::Code_Editor} } } } @@ -3772,7 +3772,7 @@ if (v == LOAD) { tooltip {function name and args, or blank for `main(..)`} xywh {95 100 310 50} labelfont 1 labelsize 11 align 132 textsize 11 resizable code0 {\#include "widgets/Code_Editor.h"} code1 {o->add_key_binding(FL_Tab, 0, use_tab_navigation);} - class {fld::widget::Code_Editor} + class {fluid::widget::Code_Editor} } } Fl_Group {} {uid 3cb7 @@ -3790,7 +3790,7 @@ update_current(o, v, tooltip {return type, or blank to return outermost widget} xywh {95 160 310 50} labelfont 1 labelsize 11 align 132 textsize 11 resizable code0 {\#include "widgets/Code_Editor.h"} code1 {o->add_key_binding(FL_Tab, 0, use_tab_navigation);} - class {fld::widget::Code_Editor} + class {fluid::widget::Code_Editor} } } Fl_Group {} {uid 01de diff --git a/fluid/panels/widget_panel.h b/fluid/panels/widget_panel.h index 6eea9fbef..05739bd50 100644 --- a/fluid/panels/widget_panel.h +++ b/fluid/panels/widget_panel.h @@ -31,14 +31,14 @@ extern Fl_Group* image_panel_imagegroup; #include #include extern Fl_Box* image_panel_data; -extern fld::widget::Formula_Input* image_panel_imagew; -extern fld::widget::Formula_Input* image_panel_imageh; +extern fluid::widget::Formula_Input* image_panel_imagew; +extern fluid::widget::Formula_Input* image_panel_imageh; #include #include extern Fl_Group* image_panel_deimagegroup; extern Fl_Box* image_panel_dedata; -extern fld::widget::Formula_Input* image_panel_deimagew; -extern fld::widget::Formula_Input* image_panel_deimageh; +extern fluid::widget::Formula_Input* image_panel_deimagew; +extern fluid::widget::Formula_Input* image_panel_deimageh; extern Fl_Button* image_panel_close; Fl_Double_Window* make_image_panel(); void run_image_panel(); @@ -61,10 +61,10 @@ extern void align_cb(Fl_Button*, void*); extern void align_text_image_cb(Fl_Choice*, void*); extern void align_position_cb(Fl_Choice*, void*); extern void position_group_cb(Fl_Group*, void*); -extern fld::widget::Formula_Input* widget_x_input; -extern fld::widget::Formula_Input* widget_y_input; -extern fld::widget::Formula_Input* widget_w_input; -extern fld::widget::Formula_Input* widget_h_input; +extern fluid::widget::Formula_Input* widget_x_input; +extern fluid::widget::Formula_Input* widget_y_input; +extern fluid::widget::Formula_Input* widget_w_input; +extern fluid::widget::Formula_Input* widget_h_input; extern Fl_Group* wp_gui_flexp; #include extern Fl_Value_Input* widget_flex_size; @@ -100,7 +100,7 @@ extern Fl_Input* v_input[4]; #include extern Fl_Text_Editor* wComment; #include "widgets/Code_Editor.h" -extern fld::widget::Code_Editor* wCallback; +extern fluid::widget::Code_Editor* wCallback; extern Fl_Group* wp_cpp_callback; extern Fl_Menu_Item whenmenu[]; #include diff --git a/fluid/panels/widget_panel/Grid_Child_Tab.cxx b/fluid/panels/widget_panel/Grid_Child_Tab.cxx index 5ef48eb20..bf5e261a3 100644 --- a/fluid/panels/widget_panel/Grid_Child_Tab.cxx +++ b/fluid/panels/widget_panel/Grid_Child_Tab.cxx @@ -6,11 +6,11 @@ #include "nodes/Grid_Node.h" extern Grid_Child_Tab *widget_tab_grid_child; -void Grid_Child_Tab::cb_widget_grid_row_input_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_row_input_i(fluid::widget::Formula_Input* o, void* v) { grid_child_cb(o, v, 8); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD); } -void Grid_Child_Tab::cb_widget_grid_row_input(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_row_input(fluid::widget::Formula_Input* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()))->cb_widget_grid_row_input_i(o,v); } @@ -34,11 +34,11 @@ void Grid_Child_Tab::cb_1(Fl_Button* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()->parent()))->cb_1_i(o,v); } -void Grid_Child_Tab::cb_widget_grid_col_input_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_col_input_i(fluid::widget::Formula_Input* o, void* v) { grid_child_cb(o, v, 9); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD); } -void Grid_Child_Tab::cb_widget_grid_col_input(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_col_input(fluid::widget::Formula_Input* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()))->cb_widget_grid_col_input_i(o,v); } @@ -174,25 +174,25 @@ Fl_Menu_Item Grid_Child_Tab::menu_Vertical[] = { { nullptr, 0, nullptr, nullptr, 0, 0, 0, 0, 0 } }; -void Grid_Child_Tab::cb_Width_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_Width_i(fluid::widget::Formula_Input* o, void* v) { grid_child_cb(o, v, 12); } -void Grid_Child_Tab::cb_Width(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_Width(fluid::widget::Formula_Input* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()))->cb_Width_i(o,v); } -void Grid_Child_Tab::cb_Height_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_Height_i(fluid::widget::Formula_Input* o, void* v) { grid_child_cb(o, v, 13); } -void Grid_Child_Tab::cb_Height(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_Height(fluid::widget::Formula_Input* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()))->cb_Height_i(o,v); } -void Grid_Child_Tab::cb_widget_grid_rowspan_input_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_rowspan_input_i(fluid::widget::Formula_Input* o, void* v) { grid_child_cb(o, v, 10); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD); } -void Grid_Child_Tab::cb_widget_grid_rowspan_input(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_rowspan_input(fluid::widget::Formula_Input* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()))->cb_widget_grid_rowspan_input_i(o,v); } @@ -216,11 +216,11 @@ void Grid_Child_Tab::cb_5(Fl_Button* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()->parent()))->cb_5_i(o,v); } -void Grid_Child_Tab::cb_widget_grid_colspan_input_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_colspan_input_i(fluid::widget::Formula_Input* o, void* v) { grid_child_cb(o, v, 11); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD); } -void Grid_Child_Tab::cb_widget_grid_colspan_input(fld::widget::Formula_Input* o, void* v) { +void Grid_Child_Tab::cb_widget_grid_colspan_input(fluid::widget::Formula_Input* o, void* v) { ((Grid_Child_Tab*)(o->parent()->parent()))->cb_widget_grid_colspan_input_i(o,v); } @@ -255,7 +255,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { widget_grid_row_input = new fld::widget::Formula_Input(85, 30, 40, 20, "Row:"); + { widget_grid_row_input = new fluid::widget::Formula_Input(85, 30, 40, 20, "Row:"); widget_grid_row_input->box(FL_DOWN_BOX); widget_grid_row_input->color(FL_BACKGROUND2_COLOR); widget_grid_row_input->selection_color(FL_SELECTION_COLOR); @@ -267,7 +267,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_row_input->callback((Fl_Callback*)cb_widget_grid_row_input); widget_grid_row_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_row_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_row_input + } // fluid::widget::Formula_Input* widget_grid_row_input { Fl_Group* o = new Fl_Group(125, 30, 30, 20); { Fl_Button* o = new Fl_Button(125, 30, 15, 20, "-"); o->compact(1); @@ -283,7 +283,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : } // Fl_Button* o o->end(); } // Fl_Group* o - { widget_grid_col_input = new fld::widget::Formula_Input(165, 30, 40, 20, "Column:"); + { widget_grid_col_input = new fluid::widget::Formula_Input(165, 30, 40, 20, "Column:"); widget_grid_col_input->box(FL_DOWN_BOX); widget_grid_col_input->color(FL_BACKGROUND2_COLOR); widget_grid_col_input->selection_color(FL_SELECTION_COLOR); @@ -295,7 +295,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_col_input->callback((Fl_Callback*)cb_widget_grid_col_input); widget_grid_col_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_col_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_col_input + } // fluid::widget::Formula_Input* widget_grid_col_input { Fl_Group* o = new Fl_Group(205, 30, 30, 20); { Fl_Button* o = new Fl_Button(205, 30, 15, 20, "-"); o->compact(1); @@ -359,7 +359,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : wp_gridc_size->labelsize(11); wp_gridc_size->callback((Fl_Callback*)propagate_load); wp_gridc_size->align(Fl_Align(FL_ALIGN_LEFT)); - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(85, 105, 55, 20, "Width:"); + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(85, 105, 55, 20, "Width:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -371,8 +371,8 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Width); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(145, 105, 55, 20, "Height:"); + } // fluid::widget::Formula_Input* o + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(145, 105, 55, 20, "Height:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -384,7 +384,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Height); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o + } // fluid::widget::Formula_Input* o { Fl_Box* o = new Fl_Box(385, 105, 1, 20); o->hide(); Fl_Group::current()->resizable(o); @@ -396,7 +396,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { widget_grid_rowspan_input = new fld::widget::Formula_Input(85, 140, 40, 20, "Row Span:"); + { widget_grid_rowspan_input = new fluid::widget::Formula_Input(85, 140, 40, 20, "Row Span:"); widget_grid_rowspan_input->box(FL_DOWN_BOX); widget_grid_rowspan_input->color(FL_BACKGROUND2_COLOR); widget_grid_rowspan_input->selection_color(FL_SELECTION_COLOR); @@ -408,7 +408,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_rowspan_input->callback((Fl_Callback*)cb_widget_grid_rowspan_input); widget_grid_rowspan_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_rowspan_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_rowspan_input + } // fluid::widget::Formula_Input* widget_grid_rowspan_input { Fl_Group* o = new Fl_Group(125, 140, 30, 20); { Fl_Button* o = new Fl_Button(125, 140, 15, 20, "-"); o->compact(1); @@ -424,7 +424,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : } // Fl_Button* o o->end(); } // Fl_Group* o - { widget_grid_colspan_input = new fld::widget::Formula_Input(165, 140, 40, 20, "Col. Span:"); + { widget_grid_colspan_input = new fluid::widget::Formula_Input(165, 140, 40, 20, "Col. Span:"); widget_grid_colspan_input->box(FL_DOWN_BOX); widget_grid_colspan_input->color(FL_BACKGROUND2_COLOR); widget_grid_colspan_input->selection_color(FL_SELECTION_COLOR); @@ -436,7 +436,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_colspan_input->callback((Fl_Callback*)cb_widget_grid_colspan_input); widget_grid_colspan_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_colspan_input->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_colspan_input + } // fluid::widget::Formula_Input* widget_grid_colspan_input { Fl_Group* o = new Fl_Group(205, 140, 30, 20); { Fl_Button* o = new Fl_Button(205, 140, 15, 20, "-"); o->compact(1); @@ -467,7 +467,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) : resize(X, Y, W, H); } -void Grid_Child_Tab::grid_child_cb(fld::widget::Formula_Input* i, void* v, int what) { +void Grid_Child_Tab::grid_child_cb(fluid::widget::Formula_Input* i, void* v, int what) { if ( !current_widget || !current_widget->parent || !current_widget->parent->is_a(Type::Grid)) diff --git a/fluid/panels/widget_panel/Grid_Child_Tab.fl b/fluid/panels/widget_panel/Grid_Child_Tab.fl index 0fa9ffef9..32adf619a 100644 --- a/fluid/panels/widget_panel/Grid_Child_Tab.fl +++ b/fluid/panels/widget_panel/Grid_Child_Tab.fl @@ -33,7 +33,7 @@ widget_class Grid_Child_Tab { callback {grid_child_cb(o, v, 8); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD);} xywh {85 30 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {125 30 30 20} @@ -62,7 +62,7 @@ widget_class Grid_Child_Tab { callback {grid_child_cb(o, v, 9); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD);} xywh {165 30 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {205 30 30 20} @@ -243,13 +243,13 @@ widget_class Grid_Child_Tab { label {Width:} callback {grid_child_cb(o, v, 12);} xywh {85 105 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input {} { label {Height:} callback {grid_child_cb(o, v, 13);} xywh {145 105 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Box {} { xywh {385 105 1 20} hide resizable @@ -265,7 +265,7 @@ widget_class Grid_Child_Tab { callback {grid_child_cb(o, v, 10); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD);} xywh {85 140 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {125 140 30 20} @@ -294,7 +294,7 @@ widget_class Grid_Child_Tab { callback {grid_child_cb(o, v, 11); if (v!=LOAD) widget_tab_grid_child->do_callback(widget_tab_grid_child, LOAD);} xywh {165 140 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {205 140 30 20} @@ -325,7 +325,7 @@ widget_class Grid_Child_Tab { Fl_Box {} { xywh {85 320 300 5} labelsize 11 hide resizable } - Function {grid_child_cb(fld::widget::Formula_Input* i, void* v, int what)} {open return_type void + Function {grid_child_cb(fluid::widget::Formula_Input* i, void* v, int what)} {open return_type void } { code {if ( !current_widget || !current_widget->parent diff --git a/fluid/panels/widget_panel/Grid_Child_Tab.h b/fluid/panels/widget_panel/Grid_Child_Tab.h index 049871e3e..6136d5c31 100644 --- a/fluid/panels/widget_panel/Grid_Child_Tab.h +++ b/fluid/panels/widget_panel/Grid_Child_Tab.h @@ -13,19 +13,19 @@ extern void propagate_load(Fl_Group*, void*); class Grid_Child_Tab : public Fl_Group { public: Grid_Child_Tab(int X, int Y, int W, int H, const char* L=nullptr); - fld::widget::Formula_Input* widget_grid_row_input; + fluid::widget::Formula_Input* widget_grid_row_input; private: - inline void cb_widget_grid_row_input_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_row_input(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_row_input_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_row_input(fluid::widget::Formula_Input*, void*); inline void cb__i(Fl_Button*, void*); static void cb_(Fl_Button*, void*); inline void cb_1_i(Fl_Button*, void*); static void cb_1(Fl_Button*, void*); public: - fld::widget::Formula_Input* widget_grid_col_input; + fluid::widget::Formula_Input* widget_grid_col_input; private: - inline void cb_widget_grid_col_input_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_col_input(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_col_input_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_col_input(fluid::widget::Formula_Input*, void*); inline void cb_2_i(Fl_Button*, void*); static void cb_2(Fl_Button*, void*); inline void cb_3_i(Fl_Button*, void*); @@ -51,29 +51,29 @@ private: public: Fl_Group* wp_gridc_size; private: - inline void cb_Width_i(fld::widget::Formula_Input*, void*); - static void cb_Width(fld::widget::Formula_Input*, void*); - inline void cb_Height_i(fld::widget::Formula_Input*, void*); - static void cb_Height(fld::widget::Formula_Input*, void*); + inline void cb_Width_i(fluid::widget::Formula_Input*, void*); + static void cb_Width(fluid::widget::Formula_Input*, void*); + inline void cb_Height_i(fluid::widget::Formula_Input*, void*); + static void cb_Height(fluid::widget::Formula_Input*, void*); public: - fld::widget::Formula_Input* widget_grid_rowspan_input; + fluid::widget::Formula_Input* widget_grid_rowspan_input; private: - inline void cb_widget_grid_rowspan_input_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_rowspan_input(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_rowspan_input_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_rowspan_input(fluid::widget::Formula_Input*, void*); inline void cb_4_i(Fl_Button*, void*); static void cb_4(Fl_Button*, void*); inline void cb_5_i(Fl_Button*, void*); static void cb_5(Fl_Button*, void*); public: - fld::widget::Formula_Input* widget_grid_colspan_input; + fluid::widget::Formula_Input* widget_grid_colspan_input; private: - inline void cb_widget_grid_colspan_input_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_colspan_input(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_colspan_input_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_colspan_input(fluid::widget::Formula_Input*, void*); inline void cb_6_i(Fl_Button*, void*); static void cb_6(Fl_Button*, void*); inline void cb_7_i(Fl_Button*, void*); static void cb_7(Fl_Button*, void*); public: - void grid_child_cb(fld::widget::Formula_Input* i, void* v, int what); + void grid_child_cb(fluid::widget::Formula_Input* i, void* v, int what); }; #endif diff --git a/fluid/panels/widget_panel/Grid_Tab.cxx b/fluid/panels/widget_panel/Grid_Tab.cxx index 5808c5e14..355acb2f6 100644 --- a/fluid/panels/widget_panel/Grid_Tab.cxx +++ b/fluid/panels/widget_panel/Grid_Tab.cxx @@ -6,7 +6,7 @@ #include "nodes/Grid_Node.h" extern Grid_Tab *widget_tab_grid; -void Grid_Tab::cb_widget_grid_rows_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_rows_i(fluid::widget::Formula_Input* o, void* v) { // grid_rows_cb Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; @@ -31,7 +31,7 @@ void Grid_Tab::cb_widget_grid_rows_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_widget_grid_rows(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_rows(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()))->cb_widget_grid_rows_i(o,v); } @@ -55,7 +55,7 @@ void Grid_Tab::cb_1(Fl_Button* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_1_i(o,v); } -void Grid_Tab::cb_widget_grid_cols_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_cols_i(fluid::widget::Formula_Input* o, void* v) { // grid_rows_cb Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; @@ -80,7 +80,7 @@ void Grid_Tab::cb_widget_grid_cols_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_widget_grid_cols(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_cols(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()))->cb_widget_grid_cols_i(o,v); } @@ -250,7 +250,7 @@ void Grid_Tab::cb_Row1(Fl_Group* o, void* v) { ((Grid_Tab*)(o->parent()))->cb_Row1_i(o,v); } -void Grid_Tab::cb_widget_grid_curr_row_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_curr_row_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int r = o->value(), old_r = r; @@ -263,7 +263,7 @@ void Grid_Tab::cb_widget_grid_curr_row_i(fld::widget::Formula_Input* o, void* v) widget_grid_curr_row_attributes->do_callback(widget_grid_curr_row_attributes, LOAD); } } -void Grid_Tab::cb_widget_grid_curr_row(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_curr_row(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()))->cb_widget_grid_curr_row_i(o,v); } @@ -287,7 +287,7 @@ void Grid_Tab::cb_5(Fl_Button* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_5_i(o,v); } -void Grid_Tab::cb_Height_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Height_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int r = widget_grid_curr_row->value(); @@ -304,11 +304,11 @@ void Grid_Tab::cb_Height_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_Height(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Height(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_Height_i(o,v); } -void Grid_Tab::cb_Weight_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Weight_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int r = widget_grid_curr_row->value(); @@ -325,11 +325,11 @@ void Grid_Tab::cb_Weight_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_Weight(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Weight(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_Weight_i(o,v); } -void Grid_Tab::cb_Gap_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Gap_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int r = widget_grid_curr_row->value(); @@ -346,11 +346,11 @@ void Grid_Tab::cb_Gap_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_Gap(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Gap(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_Gap_i(o,v); } -void Grid_Tab::cb_widget_grid_curr_col_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_curr_col_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int c = o->value(), old_c = c; @@ -363,7 +363,7 @@ void Grid_Tab::cb_widget_grid_curr_col_i(fld::widget::Formula_Input* o, void* v) widget_grid_curr_col_attributes->do_callback(widget_grid_curr_col_attributes, LOAD); } } -void Grid_Tab::cb_widget_grid_curr_col(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_widget_grid_curr_col(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()))->cb_widget_grid_curr_col_i(o,v); } @@ -387,7 +387,7 @@ void Grid_Tab::cb_7(Fl_Button* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_7_i(o,v); } -void Grid_Tab::cb_Width_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Width_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int c = widget_grid_curr_col->value(); @@ -404,11 +404,11 @@ void Grid_Tab::cb_Width_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_Width(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Width(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_Width_i(o,v); } -void Grid_Tab::cb_Weight1_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Weight1_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int c = widget_grid_curr_col->value(); @@ -425,11 +425,11 @@ void Grid_Tab::cb_Weight1_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_Weight1(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Weight1(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_Weight1_i(o,v); } -void Grid_Tab::cb_Gap1_i(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Gap1_i(fluid::widget::Formula_Input* o, void* v) { Fl_Grid *grid = Grid_Node::selected(); if (!grid) return; int c = widget_grid_curr_col->value(); @@ -446,7 +446,7 @@ void Grid_Tab::cb_Gap1_i(fld::widget::Formula_Input* o, void* v) { } } } -void Grid_Tab::cb_Gap1(fld::widget::Formula_Input* o, void* v) { +void Grid_Tab::cb_Gap1(fluid::widget::Formula_Input* o, void* v) { ((Grid_Tab*)(o->parent()->parent()->parent()))->cb_Gap1_i(o,v); } @@ -460,7 +460,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { widget_grid_rows = new fld::widget::Formula_Input(85, 30, 40, 20, "Rows:"); + { widget_grid_rows = new fluid::widget::Formula_Input(85, 30, 40, 20, "Rows:"); widget_grid_rows->tooltip("Number of horizontal rows in the Grid group"); widget_grid_rows->box(FL_DOWN_BOX); widget_grid_rows->color(FL_BACKGROUND2_COLOR); @@ -473,7 +473,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_rows->callback((Fl_Callback*)cb_widget_grid_rows); widget_grid_rows->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_rows->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_rows + } // fluid::widget::Formula_Input* widget_grid_rows { Fl_Group* o = new Fl_Group(125, 30, 30, 20); { Fl_Button* o = new Fl_Button(125, 30, 15, 20, "-"); o->compact(1); @@ -489,7 +489,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : } // Fl_Button* o o->end(); } // Fl_Group* o - { widget_grid_cols = new fld::widget::Formula_Input(165, 30, 40, 20, "Columns:"); + { widget_grid_cols = new fluid::widget::Formula_Input(165, 30, 40, 20, "Columns:"); widget_grid_cols->tooltip("Number of vertical columns in the Grid group"); widget_grid_cols->box(FL_DOWN_BOX); widget_grid_cols->color(FL_BACKGROUND2_COLOR); @@ -502,7 +502,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_cols->callback((Fl_Callback*)cb_widget_grid_cols); widget_grid_cols->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_cols->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_cols + } // fluid::widget::Formula_Input* widget_grid_cols { Fl_Group* o = new Fl_Group(205, 30, 30, 20); { Fl_Button* o = new Fl_Button(205, 30, 15, 20, "-"); o->compact(1); @@ -602,7 +602,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->labelsize(11); o->callback((Fl_Callback*)cb_Row1); o->align(Fl_Align(FL_ALIGN_LEFT)); - { widget_grid_curr_row = new fld::widget::Formula_Input(85, 145, 40, 20, "Index"); + { widget_grid_curr_row = new fluid::widget::Formula_Input(85, 145, 40, 20, "Index"); widget_grid_curr_row->box(FL_DOWN_BOX); widget_grid_curr_row->color(FL_BACKGROUND2_COLOR); widget_grid_curr_row->selection_color(FL_SELECTION_COLOR); @@ -614,7 +614,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_curr_row->callback((Fl_Callback*)cb_widget_grid_curr_row); widget_grid_curr_row->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_curr_row->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_curr_row + } // fluid::widget::Formula_Input* widget_grid_curr_row { Fl_Group* o = new Fl_Group(125, 145, 30, 20); o->callback((Fl_Callback*)propagate_load); { Fl_Button* o = new Fl_Button(125, 145, 15, 20, "-"); @@ -636,7 +636,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : } // Fl_Box* o { widget_grid_curr_row_attributes = new Fl_Group(170, 145, 175, 20); widget_grid_curr_row_attributes->callback((Fl_Callback*)propagate_load); - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(170, 145, 55, 20, "Height:"); + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(170, 145, 55, 20, "Height:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -648,8 +648,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Height); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(230, 145, 55, 20, "Weight:"); + } // fluid::widget::Formula_Input* o + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(230, 145, 55, 20, "Weight:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -661,8 +661,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Weight); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(290, 145, 55, 20, "Gap:"); + } // fluid::widget::Formula_Input* o + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(290, 145, 55, 20, "Gap:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -674,7 +674,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Gap); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o + } // fluid::widget::Formula_Input* o widget_grid_curr_row_attributes->end(); } // Fl_Group* widget_grid_curr_row_attributes { Fl_Box* o = new Fl_Box(390, 145, 1, 20); @@ -688,7 +688,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(Fl_Align(FL_ALIGN_LEFT)); - { widget_grid_curr_col = new fld::widget::Formula_Input(85, 180, 40, 20, "Index"); + { widget_grid_curr_col = new fluid::widget::Formula_Input(85, 180, 40, 20, "Index"); widget_grid_curr_col->box(FL_DOWN_BOX); widget_grid_curr_col->color(FL_BACKGROUND2_COLOR); widget_grid_curr_col->selection_color(FL_SELECTION_COLOR); @@ -700,7 +700,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : widget_grid_curr_col->callback((Fl_Callback*)cb_widget_grid_curr_col); widget_grid_curr_col->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_grid_curr_col->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* widget_grid_curr_col + } // fluid::widget::Formula_Input* widget_grid_curr_col { Fl_Group* o = new Fl_Group(125, 180, 30, 20); { Fl_Button* o = new Fl_Button(125, 180, 15, 20, "-"); o->compact(1); @@ -721,7 +721,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : } // Fl_Box* o { widget_grid_curr_col_attributes = new Fl_Group(170, 180, 175, 20); widget_grid_curr_col_attributes->callback((Fl_Callback*)propagate_load); - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(170, 180, 55, 20, "Width:"); + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(170, 180, 55, 20, "Width:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -733,8 +733,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Width); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(230, 180, 55, 20, "Weight:"); + } // fluid::widget::Formula_Input* o + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(230, 180, 55, 20, "Weight:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -746,8 +746,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Weight1); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o - { fld::widget::Formula_Input* o = new fld::widget::Formula_Input(290, 180, 55, 20, "Gap:"); + } // fluid::widget::Formula_Input* o + { fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(290, 180, 55, 20, "Gap:"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); o->selection_color(FL_SELECTION_COLOR); @@ -759,7 +759,7 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) : o->callback((Fl_Callback*)cb_Gap1); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->when(FL_WHEN_RELEASE); - } // fld::widget::Formula_Input* o + } // fluid::widget::Formula_Input* o widget_grid_curr_col_attributes->end(); } // Fl_Group* widget_grid_curr_col_attributes { Fl_Box* o = new Fl_Box(390, 180, 1, 20); diff --git a/fluid/panels/widget_panel/Grid_Tab.fl b/fluid/panels/widget_panel/Grid_Tab.fl index 422ddf789..7860ac83a 100644 --- a/fluid/panels/widget_panel/Grid_Tab.fl +++ b/fluid/panels/widget_panel/Grid_Tab.fl @@ -54,7 +54,7 @@ if (v == LOAD) { } }} tooltip {Number of horizontal rows in the Grid group} xywh {85 30 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {125 30 30 20} @@ -104,7 +104,7 @@ if (v == LOAD) { } }} tooltip {Number of vertical columns in the Grid group} xywh {165 30 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {205 30 30 20} @@ -296,7 +296,7 @@ if (v == LOAD) { widget_grid_curr_row_attributes->do_callback(widget_grid_curr_row_attributes, LOAD); }} xywh {85 145 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} { callback propagate_load open @@ -347,7 +347,7 @@ if (v == LOAD) { } }} xywh {170 145 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input {} { label {Weight:} @@ -367,7 +367,7 @@ if (v == LOAD) { } }} xywh {230 145 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input {} { label {Gap:} @@ -387,7 +387,7 @@ if (v == LOAD) { } }} xywh {290 145 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } } Fl_Box {} { @@ -413,7 +413,7 @@ if (v == LOAD) { widget_grid_curr_col_attributes->do_callback(widget_grid_curr_col_attributes, LOAD); }} xywh {85 180 40 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Group {} {open xywh {125 180 30 20} @@ -463,7 +463,7 @@ if (v == LOAD) { } }} xywh {170 180 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input {} { label {Weight:} @@ -483,7 +483,7 @@ if (v == LOAD) { } }} xywh {230 180 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } Fl_Input {} { label {Gap:} @@ -503,7 +503,7 @@ if (v == LOAD) { } }} xywh {290 180 55 20} labelsize 11 align 5 textsize 11 - class {fld::widget::Formula_Input} + class {fluid::widget::Formula_Input} } } Fl_Box {} { diff --git a/fluid/panels/widget_panel/Grid_Tab.h b/fluid/panels/widget_panel/Grid_Tab.h index f1a1f791a..7a0660bf1 100644 --- a/fluid/panels/widget_panel/Grid_Tab.h +++ b/fluid/panels/widget_panel/Grid_Tab.h @@ -13,19 +13,19 @@ extern void propagate_load(Fl_Group*, void*); class Grid_Tab : public Fl_Group { public: Grid_Tab(int X, int Y, int W, int H, const char* L=nullptr); - fld::widget::Formula_Input* widget_grid_rows; + fluid::widget::Formula_Input* widget_grid_rows; private: - inline void cb_widget_grid_rows_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_rows(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_rows_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_rows(fluid::widget::Formula_Input*, void*); inline void cb__i(Fl_Button*, void*); static void cb_(Fl_Button*, void*); inline void cb_1_i(Fl_Button*, void*); static void cb_1(Fl_Button*, void*); public: - fld::widget::Formula_Input* widget_grid_cols; + fluid::widget::Formula_Input* widget_grid_cols; private: - inline void cb_widget_grid_cols_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_cols(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_cols_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_cols(fluid::widget::Formula_Input*, void*); inline void cb_2_i(Fl_Button*, void*); static void cb_2(Fl_Button*, void*); inline void cb_3_i(Fl_Button*, void*); @@ -51,10 +51,10 @@ private: inline void cb_Row1_i(Fl_Group*, void*); static void cb_Row1(Fl_Group*, void*); public: - fld::widget::Formula_Input* widget_grid_curr_row; + fluid::widget::Formula_Input* widget_grid_curr_row; private: - inline void cb_widget_grid_curr_row_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_curr_row(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_curr_row_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_curr_row(fluid::widget::Formula_Input*, void*); inline void cb_4_i(Fl_Button*, void*); static void cb_4(Fl_Button*, void*); inline void cb_5_i(Fl_Button*, void*); @@ -62,17 +62,17 @@ private: public: Fl_Group* widget_grid_curr_row_attributes; private: - inline void cb_Height_i(fld::widget::Formula_Input*, void*); - static void cb_Height(fld::widget::Formula_Input*, void*); - inline void cb_Weight_i(fld::widget::Formula_Input*, void*); - static void cb_Weight(fld::widget::Formula_Input*, void*); - inline void cb_Gap_i(fld::widget::Formula_Input*, void*); - static void cb_Gap(fld::widget::Formula_Input*, void*); + inline void cb_Height_i(fluid::widget::Formula_Input*, void*); + static void cb_Height(fluid::widget::Formula_Input*, void*); + inline void cb_Weight_i(fluid::widget::Formula_Input*, void*); + static void cb_Weight(fluid::widget::Formula_Input*, void*); + inline void cb_Gap_i(fluid::widget::Formula_Input*, void*); + static void cb_Gap(fluid::widget::Formula_Input*, void*); public: - fld::widget::Formula_Input* widget_grid_curr_col; + fluid::widget::Formula_Input* widget_grid_curr_col; private: - inline void cb_widget_grid_curr_col_i(fld::widget::Formula_Input*, void*); - static void cb_widget_grid_curr_col(fld::widget::Formula_Input*, void*); + inline void cb_widget_grid_curr_col_i(fluid::widget::Formula_Input*, void*); + static void cb_widget_grid_curr_col(fluid::widget::Formula_Input*, void*); inline void cb_6_i(Fl_Button*, void*); static void cb_6(Fl_Button*, void*); inline void cb_7_i(Fl_Button*, void*); @@ -80,11 +80,11 @@ private: public: Fl_Group* widget_grid_curr_col_attributes; private: - inline void cb_Width_i(fld::widget::Formula_Input*, void*); - static void cb_Width(fld::widget::Formula_Input*, void*); - inline void cb_Weight1_i(fld::widget::Formula_Input*, void*); - static void cb_Weight1(fld::widget::Formula_Input*, void*); - inline void cb_Gap1_i(fld::widget::Formula_Input*, void*); - static void cb_Gap1(fld::widget::Formula_Input*, void*); + inline void cb_Width_i(fluid::widget::Formula_Input*, void*); + static void cb_Width(fluid::widget::Formula_Input*, void*); + inline void cb_Weight1_i(fluid::widget::Formula_Input*, void*); + static void cb_Weight1(fluid::widget::Formula_Input*, void*); + inline void cb_Gap1_i(fluid::widget::Formula_Input*, void*); + static void cb_Gap1(fluid::widget::Formula_Input*, void*); }; #endif diff --git a/fluid/proj/Image_Asset.cxx b/fluid/proj/Image_Asset.cxx index c49657333..4bbf425ed 100644 --- a/fluid/proj/Image_Asset.cxx +++ b/fluid/proj/Image_Asset.cxx @@ -54,7 +54,7 @@ \param fmt Short image type name used in the error message (e.g. "GIF", "PNG"). \return Number of bytes written, or 0 if the file could not be opened or read. */ -size_t Image_Asset::write_static_binary(fld::io::Code_Writer& f, const char* fmt) { +size_t Image_Asset::write_static_binary(fluid::io::Code_Writer& f, const char* fmt) { size_t nData = 0; map_->project().enter_project_dir(); FILE *in = fl_fopen(filename(), "rb"); @@ -89,7 +89,7 @@ size_t Image_Asset::write_static_binary(fld::io::Code_Writer& f, const char* fmt \param fmt Short image type name used in the error message (e.g. "SVG"). \return Number of bytes written, or 0 if the file could not be opened or read. */ -size_t Image_Asset::write_static_text(fld::io::Code_Writer& f, const char* fmt) { +size_t Image_Asset::write_static_text(fluid::io::Code_Writer& f, const char* fmt) { size_t nData = 0; map_->project().enter_project_dir(); FILE *in = fl_fopen(filename(), "rb"); @@ -127,7 +127,7 @@ size_t Image_Asset::write_static_text(fld::io::Code_Writer& f, const char* fmt) \param f Code writer to emit the array and initializer into. \param idata_name Variable name to use for the generated static data array. */ -void Image_Asset::write_static_rgb(fld::io::Code_Writer& f, const char* idata_name) { +void Image_Asset::write_static_rgb(fluid::io::Code_Writer& f, const char* idata_name) { // Write image data... f.write_c("\n"); f.write_c_once("#include \n"); @@ -154,7 +154,7 @@ void Image_Asset::write_static_rgb(fld::io::Code_Writer& f, const char* idata_na \param f Code writer to emit the data and initializer into. \param compressed If non-zero, embed the original compressed file bytes. */ -void Image_Asset::write_static(fld::io::Code_Writer& f, int compressed) { +void Image_Asset::write_static(fluid::io::Code_Writer& f, int compressed) { if (!image_) return; const char *idata_name = f.unique_id(this, "idata", fl_filename_name(filename()), nullptr); initializer_function_ = f.unique_id(this, "image", fl_filename_name(filename()), nullptr); @@ -288,7 +288,7 @@ void Image_Asset::write_static(fld::io::Code_Writer& f, int compressed) { \param f Code writer to emit the diagnostic lines into. \param fmt Short image type name shown in the warning (e.g. "GIF", "PNG"). */ -void Image_Asset::write_file_error(fld::io::Code_Writer& f, const char *fmt) { +void Image_Asset::write_file_error(fluid::io::Code_Writer& f, const char *fmt) { f.write_c("#warning Cannot read %s file \"%s\": %s\n", fmt, filename(), strerror(errno)); map_->project().enter_project_dir(); f.write_c("// Searching in path \"%s\"\n", fl_getcwd(nullptr, FL_PATH_MAX)); @@ -320,7 +320,7 @@ void Image_Asset::write_file_error(fld::io::Code_Writer& f, const char *fmt) { \param format printf-style format string for the constructor arguments, followed by the matching variadic arguments. */ -void Image_Asset::write_initializer(fld::io::Code_Writer& f, const char *image_class, const char *format, ...) { +void Image_Asset::write_initializer(fluid::io::Code_Writer& f, const char *image_class, const char *format, ...) { va_list ap; va_start(ap, format); f.write_c("static Fl_Image* %s() {\n", initializer_function_.c_str()); @@ -348,7 +348,7 @@ void Image_Asset::write_initializer(fld::io::Code_Writer& f, const char *image_c \param var Name of the Fl_Widget or Fl_Menu_Item to attach the image to. \param inactive If true, use deimage() instead of image(). */ -void Image_Asset::write_code(fld::io::Code_Writer& f, int bind, const char *var, int inactive) { +void Image_Asset::write_code(fluid::io::Code_Writer& f, int bind, const char *var, int inactive) { if (image_) { f.write_c("%s%s->%s%s( %s() );\n", f.indent(), @@ -375,7 +375,7 @@ void Image_Asset::write_code(fld::io::Code_Writer& f, int bind, const char *var, \param f Code writer to emit the expression into. \param inactive Unused; present for API symmetry with write_code(). */ -void Image_Asset::write_inline(fld::io::Code_Writer& f, int inactive) { +void Image_Asset::write_inline(fluid::io::Code_Writer& f, int inactive) { (void)inactive; if (image_) { f.write_c("%s()", initializer_function_.c_str()); diff --git a/fluid/proj/Image_Asset.h b/fluid/proj/Image_Asset.h index e22b5a463..3e400a6c7 100644 --- a/fluid/proj/Image_Asset.h +++ b/fluid/proj/Image_Asset.h @@ -46,9 +46,9 @@ private: // methods Image_Asset(const Image_Asset&) = delete; Image_Asset& operator=(const Image_Asset&) = delete; - size_t write_static_binary(fld::io::Code_Writer& f, const char* fmt); - size_t write_static_text(fld::io::Code_Writer& f, const char* fmt); - void write_static_rgb(fld::io::Code_Writer& f, const char* idata_name); + size_t write_static_binary(fluid::io::Code_Writer& f, const char* fmt); + size_t write_static_text(fluid::io::Code_Writer& f, const char* fmt); + void write_static_rgb(fluid::io::Code_Writer& f, const char* idata_name); public: // methods ~Image_Asset(); @@ -58,11 +58,11 @@ public: // methods /// Return the image filename relative to the project directory. const char *filename() const { return filename_.c_str(); } - void write_static(fld::io::Code_Writer& f, int compressed); - void write_initializer(fld::io::Code_Writer& f, const char *type_name, const char *format, ...); - void write_code(fld::io::Code_Writer& f, int bind, const char *var, int inactive = 0); - void write_inline(fld::io::Code_Writer& f, int inactive = 0); - void write_file_error(fld::io::Code_Writer& f, const char *fmt); + void write_static(fluid::io::Code_Writer& f, int compressed); + void write_initializer(fluid::io::Code_Writer& f, const char *type_name, const char *format, ...); + void write_code(fluid::io::Code_Writer& f, int bind, const char *var, int inactive = 0); + void write_inline(fluid::io::Code_Writer& f, int inactive = 0); + void write_file_error(fluid::io::Code_Writer& f, const char *fmt); }; // Pop up a file chooser and return a valid image selected by the user, diff --git a/fluid/proj/Image_Asset_Map.h b/fluid/proj/Image_Asset_Map.h index 1892c1cb7..0a0edcf82 100644 --- a/fluid/proj/Image_Asset_Map.h +++ b/fluid/proj/Image_Asset_Map.h @@ -23,19 +23,19 @@ class Image_Asset; -namespace fld { class Project; } +namespace fluid { class Project; } /** \brief Cache of all active Image_Asset objects for a project, keyed by filename. Holds weak references so assets are released automatically when no Widget_Node holds a shared_ptr to them anymore. Each map is owned by - one fld::Project and holds a reference to it to avoid using the global Fluid.proj. + one fluid::Project and holds a reference to it to avoid using the global Fluid.proj. */ class Image_Asset_Map { friend class Image_Asset; - fld::Project& proj_; + fluid::Project& proj_; mutable std::unordered_map> map_; void insert(const std::string& name, std::shared_ptr asset); @@ -43,12 +43,12 @@ class Image_Asset_Map { public: /// Construct the map and bind it to \p proj for directory and error access. - Image_Asset_Map(fld::Project& proj) : proj_(proj) {} + Image_Asset_Map(fluid::Project& proj) : proj_(proj) {} Image_Asset_Map(const Image_Asset_Map&) = delete; Image_Asset_Map& operator=(const Image_Asset_Map&) = delete; /// Return the project that owns this map. - fld::Project& project() const { return proj_; } + fluid::Project& project() const { return proj_; } /// Look up an asset by filename. Returns nullptr if not cached or expired. std::shared_ptr find(const std::string& name) const; diff --git a/fluid/proj/i18n.cxx b/fluid/proj/i18n.cxx index d2b9b202c..d4a1da1b9 100644 --- a/fluid/proj/i18n.cxx +++ b/fluid/proj/i18n.cxx @@ -19,16 +19,16 @@ #include "io/Project_Reader.h" #include "io/Project_Writer.h" -using namespace fld; +using namespace fluid; -using namespace fld::proj; +using namespace fluid::proj; /** Reset all project setting to create a new empty project. */ void I18n::reset() { - type = fld::I18n_Type::NONE; + type = fluid::I18n_Type::NONE; gnu_include = ""; gnu_conditional = ""; @@ -43,7 +43,7 @@ void I18n::reset() { void I18n::read(io::Project_Reader &f, const char *key) { if (!strcmp(key, "i18n_type")) { - type = static_cast(atoi(f.read_word())); + type = static_cast(atoi(f.read_word())); } else if (!strcmp(key, "i18n_gnu_function")) { gnu_function = f.read_word(); } else if (!strcmp(key, "i18n_gnu_static_function")) { @@ -53,33 +53,33 @@ void I18n::read(io::Project_Reader &f, const char *key) { } else if (!strcmp(key, "i18n_pos_set")) { posix_set = f.read_word(); } else if (!strcmp(key, "i18n_include")) { - if (type == fld::I18n_Type::GNU) { + if (type == fluid::I18n_Type::GNU) { gnu_include = f.read_word(); - } else if (type == fld::I18n_Type::POSIX) { + } else if (type == fluid::I18n_Type::POSIX) { posix_include = f.read_word(); } } else if (!strcmp(key, "i18n_conditional")) { - if (type == fld::I18n_Type::GNU) { + if (type == fluid::I18n_Type::GNU) { gnu_conditional = f.read_word(); - } else if (type == fld::I18n_Type::POSIX) { + } else if (type == fluid::I18n_Type::POSIX) { posix_conditional = f.read_word(); } } } void I18n::write(io::Project_Writer &f) const { - if ((type != fld::I18n_Type::NONE)) { + if ((type != fluid::I18n_Type::NONE)) { f.write_string("\ni18n_type %d", static_cast(type)); switch (type) { - case fld::I18n_Type::NONE: + case fluid::I18n_Type::NONE: break; - case fld::I18n_Type::GNU : /* GNU gettext */ + case fluid::I18n_Type::GNU : /* GNU gettext */ f.write_string("\ni18n_include"); f.write_word(gnu_include); f.write_string("\ni18n_conditional"); f.write_word(gnu_conditional); f.write_string("\ni18n_gnu_function"); f.write_word(gnu_function); f.write_string("\ni18n_gnu_static_function"); f.write_word(gnu_static_function); break; - case fld::I18n_Type::POSIX : /* POSIX catgets */ + case fluid::I18n_Type::POSIX : /* POSIX catgets */ f.write_string("\ni18n_include"); f.write_word(posix_include); f.write_string("\ni18n_conditional"); f.write_word(posix_conditional); if (!posix_file.empty()) { diff --git a/fluid/proj/i18n.h b/fluid/proj/i18n.h index 30e09efae..9cc78a280 100644 --- a/fluid/proj/i18n.h +++ b/fluid/proj/i18n.h @@ -19,7 +19,7 @@ #include -namespace fld { +namespace fluid { class Project; @@ -48,7 +48,7 @@ public: Project &project_; /// One of the available internationalization types. - fld::I18n_Type type = I18n_Type::NONE; + fluid::I18n_Type type = I18n_Type::NONE; /// Include file for GNU i18n, writes an #include statement into the source /// file. This is usually `` or `"gettext.h"` for GNU gettext. std::string gnu_include = ""; @@ -81,7 +81,7 @@ public: // Methods } // namespace proj -} // namespace fld +} // namespace fluid #endif // FLUID_PROJ_I18N_H diff --git a/fluid/proj/mergeback.cxx b/fluid/proj/mergeback.cxx index 869a9fe97..6fdf8f9fd 100644 --- a/fluid/proj/mergeback.cxx +++ b/fluid/proj/mergeback.cxx @@ -35,8 +35,8 @@ extern void propagate_load(Fl_Group*, void*); extern void load_panel(); extern void redraw_browser(); -using namespace fld; -using namespace fld::proj; +using namespace fluid; +using namespace fluid::proj; // TODO: add application user setting to control mergeback // [] new projects default to mergeback @@ -92,7 +92,7 @@ using namespace fld::proj; Returns 0 if nothing changed, and 1 if it merged any changes back, and -1 if there were conflicts. - \note this function is currently part of fld::io::Code_Writer to get easy access + \note this function is currently part of fluid::io::Code_Writer to get easy access to our crc32 code that also wrote the code file originally. \param[in] s path and filename of the source code file @@ -243,7 +243,7 @@ void Mergeback::analyse_callback(unsigned long code_crc, unsigned long tag_crc, Node *tp = proj_.tree.find_by_uid(uid); if (tp && tp->is_true_widget()) { std::string cb = tp->callback(); cb += "\n"; - unsigned long project_crc = fld::io::Code_Writer::block_crc(cb.c_str()); + unsigned long project_crc = fluid::io::Code_Writer::block_crc(cb.c_str()); // check if the code and project crc are the same, so this modification was already applied if (project_crc!=code_crc) { num_changed_code++; @@ -265,7 +265,7 @@ void Mergeback::analyse_code(unsigned long code_crc, unsigned long tag_crc, int Node *tp = proj_.tree.find_by_uid(uid); if (tp && tp->is_a(Type::Code)) { std::string code = tp->name(); code += "\n"; - unsigned long project_crc = fld::io::Code_Writer::block_crc(code.c_str()); + unsigned long project_crc = fluid::io::Code_Writer::block_crc(code.c_str()); // check if the code and project crc are the same, so this modification was already applied if (project_crc!=code_crc) { num_changed_code++; @@ -444,7 +444,7 @@ int Mergeback::analyse() { const char *tag = find_mergeback_tag(line); if (!tag) { // if this line has no tag, add the contents to the CRC and continue - code_crc = fld::io::Code_Writer::block_crc(line, -1, code_crc, &line_start); + code_crc = fluid::io::Code_Writer::block_crc(line, -1, code_crc, &line_start); } else { // if this line has a tag, read all tag data Tag tag_type = Tag::UNUSED_; @@ -485,7 +485,7 @@ int Mergeback::apply_callback(long block_end, long block_start, unsigned long co Node *tp = proj_.tree.find_by_uid(uid); if (tp && tp->is_true_widget()) { std::string cb = tp->callback(); cb += "\n"; - unsigned long project_crc = fld::io::Code_Writer::block_crc(cb.c_str()); + unsigned long project_crc = fluid::io::Code_Writer::block_crc(cb.c_str()); if (project_crc!=code_crc) { tp->callback(read_and_unindent_block(block_start, block_end).c_str()); return 1; @@ -501,7 +501,7 @@ int Mergeback::apply_code(long block_end, long block_start, unsigned long code_c Node *tp = proj_.tree.find_by_uid(uid); if (tp && tp->is_a(Type::Code)) { std::string cb = tp->name(); cb += "\n"; - unsigned long project_crc = fld::io::Code_Writer::block_crc(cb.c_str()); + unsigned long project_crc = fluid::io::Code_Writer::block_crc(cb.c_str()); if (project_crc!=code_crc) { tp->name(read_and_unindent_block(block_start, block_end).c_str()); return 1; @@ -537,7 +537,7 @@ int Mergeback::apply() { const char *tag = find_mergeback_tag(line); if (!tag) { // if this line has no tag, add the contents to the CRC and continue - code_crc = fld::io::Code_Writer::block_crc(line, -1, code_crc, &line_start); + code_crc = fluid::io::Code_Writer::block_crc(line, -1, code_crc, &line_start); block_end = ::ftell(code); } else { // if this line has a tag, read all tag data diff --git a/fluid/proj/mergeback.h b/fluid/proj/mergeback.h index 7b4d5cf62..369d4dd70 100644 --- a/fluid/proj/mergeback.h +++ b/fluid/proj/mergeback.h @@ -23,7 +23,7 @@ #include #include -namespace fld { +namespace fluid { class Project; @@ -40,7 +40,7 @@ public: GENERIC = 0, CODE, MENU_CALLBACK, WIDGET_CALLBACK, UNUSED_ }; enum class Task { - ANALYSE = 0, INTERACTIVE, APPLY, APPLY_IF_SAFE = 3 + ANALYSE = 0, INTERACTIVE, APPLY, APPLY_IF_SAFE }; enum Feedback { QUIET = 0, CHATTY = 1 }; protected: @@ -88,7 +88,7 @@ public: extern int merge_back(const std::string &s, const std::string &p, int task); } // namespace proj -} // namespace fld +} // namespace fluid extern void start_auto_mergeback(); extern void mergeback_on_load(); diff --git a/fluid/proj/undo.cxx b/fluid/proj/undo.cxx index 0f1a478fb..ee36fed79 100644 --- a/fluid/proj/undo.cxx +++ b/fluid/proj/undo.cxx @@ -47,8 +47,8 @@ extern Fl_Window* the_panel; -using namespace fld; -using namespace fld::proj; +using namespace fluid; +using namespace fluid::proj; Undo::Undo(Project &p) @@ -95,7 +95,7 @@ void Undo::redo() { widget_browser->new_list(); } int reload_panel = (the_panel && the_panel->visible()); - if (!fld::io::read_file(proj_, filename(current_ + 1), 0)) { + if (!fluid::io::read_file(proj_, filename(current_ + 1), 0)) { // Unable to read checkpoint file, don't redo... widget_browser->rebuild(); proj_.update_settings_dialog(); @@ -134,7 +134,7 @@ void Undo::undo() { } if (current_ == last_) { - fld::io::write_file(proj_, filename(current_)); + fluid::io::write_file(proj_, filename(current_)); } suspend(); @@ -146,7 +146,7 @@ void Undo::undo() { widget_browser->new_list(); } int reload_panel = (the_panel && the_panel->visible()); - if (!fld::io::read_file(proj_, filename(current_ - 1), 0)) { + if (!fluid::io::read_file(proj_, filename(current_ - 1), 0)) { // Unable to read checkpoint file, don't undo... widget_browser->rebuild(); proj_.update_settings_dialog(); @@ -213,7 +213,7 @@ void Undo::checkpoint() { // Save the current UI to a checkpoint file... const char *file = filename(current_); - if (!fld::io::write_file(proj_, file)) { + if (!fluid::io::write_file(proj_, file)) { // Don't attempt to do undo stuff if we can't write a checkpoint file... perror(file); return; diff --git a/fluid/proj/undo.h b/fluid/proj/undo.h index 7bb02b72f..4870bcc2a 100644 --- a/fluid/proj/undo.h +++ b/fluid/proj/undo.h @@ -21,7 +21,7 @@ class Fl_Widget; -namespace fld { +namespace fluid { class Project; @@ -86,7 +86,7 @@ public: static void undo_cb(Fl_Widget *, void *); }; -} // namespace fld +} // namespace fluid } // namespace proj diff --git a/fluid/tools/ExternalCodeEditor_UNIX.cxx b/fluid/tools/ExternalCodeEditor_UNIX.cxx index 9e9ffd00e..d13d4d5b6 100644 --- a/fluid/tools/ExternalCodeEditor_UNIX.cxx +++ b/fluid/tools/ExternalCodeEditor_UNIX.cxx @@ -23,7 +23,7 @@ #include /* free().. */ #include /* snprintf().. */ -using namespace fld; +using namespace fluid; // Static local data static int L_editors_open = 0; // keep track of #editors open diff --git a/fluid/tools/ExternalCodeEditor_WIN32.cxx b/fluid/tools/ExternalCodeEditor_WIN32.cxx index 64d791400..32708f5db 100644 --- a/fluid/tools/ExternalCodeEditor_WIN32.cxx +++ b/fluid/tools/ExternalCodeEditor_WIN32.cxx @@ -28,7 +28,7 @@ #include // snprintf() #include -using namespace fld; +using namespace fluid; // Static local data static int L_editors_open = 0; // keep track of #editors open diff --git a/fluid/tools/filename.cxx b/fluid/tools/filename.cxx index a5d6e22b3..696c551e0 100644 --- a/fluid/tools/filename.cxx +++ b/fluid/tools/filename.cxx @@ -101,7 +101,7 @@ std::string fl_filename_shortened(const std::string &filename, int max_chars) { \param[in] str directory or path name \return a new string, ending with a '/' */ -std::string fld::end_with_slash(const std::string &str) { +std::string fluid::end_with_slash(const std::string &str) { char last = str[str.size()-1]; if (last !='/' && last != '\\') return str + "/"; @@ -114,7 +114,7 @@ std::string fld::end_with_slash(const std::string &str) { \param[in] fn a file path in Unix or Windows format \return a copy of the file path in Unix format. */ -std::string fld::fix_separators(const std::string &fn) { +std::string fluid::fix_separators(const std::string &fn) { std::string ret = fn; for (size_t i=0; i -namespace fld { +namespace fluid { namespace widget { /** @@ -36,6 +36,6 @@ public: }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_APP_MENU_BAR_H diff --git a/fluid/widgets/Bin_Button.cxx b/fluid/widgets/Bin_Button.cxx index 32630369a..c924c027b 100644 --- a/fluid/widgets/Bin_Button.cxx +++ b/fluid/widgets/Bin_Button.cxx @@ -24,11 +24,11 @@ #include #include -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; -/** \class fld::widget::Bin_Button +/** \class fluid::widget::Bin_Button The Bin_Button button is a button that can be used in the widget bin to allow the user to drag and drop widgets into a window or group. This feature makes it easy for the user to position a widget at a specific location within @@ -38,7 +38,7 @@ using namespace fld::widget; /** Convert mouse dragging into a drag and drop event. */ -int fld::widget::Bin_Button::handle(int inEvent) +int fluid::widget::Bin_Button::handle(int inEvent) { int ret = 0; switch (inEvent) { @@ -67,7 +67,7 @@ int fld::widget::Bin_Button::handle(int inEvent) return Fl_Button::handle(inEvent); } -/** \class fld::widget::Bin_Window_Button +/** \class fluid::widget::Bin_Window_Button The Bin_Window_Button button is used in the widget bin to create new windows by dragging and dropping. When the button is dragged and dropped onto the desktop, a new window will be created at the drop location. @@ -79,7 +79,7 @@ int fld::widget::Bin_Button::handle(int inEvent) /** Convert mouse dragging into a drag and drop event. */ -int fld::widget::Bin_Window_Button::handle(int inEvent) +int fluid::widget::Bin_Window_Button::handle(int inEvent) { static Fl_Window *drag_win = nullptr; int ret = 0; diff --git a/fluid/widgets/Bin_Button.h b/fluid/widgets/Bin_Button.h index 342fe0eac..a36a60941 100644 --- a/fluid/widgets/Bin_Button.h +++ b/fluid/widgets/Bin_Button.h @@ -19,7 +19,7 @@ #include -namespace fld { +namespace fluid { namespace widget { // Adding drag and drop for dragging widgets into windows. @@ -39,6 +39,6 @@ public: }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_BIN_BUTTON_H diff --git a/fluid/widgets/Code_Editor.cxx b/fluid/widgets/Code_Editor.cxx index 216ffab8f..90873e8b8 100644 --- a/fluid/widgets/Code_Editor.cxx +++ b/fluid/widgets/Code_Editor.cxx @@ -23,8 +23,8 @@ #include #include "widgets/Code_Editor.h" -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; // ---- Code_Editor implementation diff --git a/fluid/widgets/Code_Editor.h b/fluid/widgets/Code_Editor.h index fec57727c..3550425ad 100644 --- a/fluid/widgets/Code_Editor.h +++ b/fluid/widgets/Code_Editor.h @@ -27,7 +27,7 @@ #include -namespace fld { +namespace fluid { namespace widget { // ---- Code_Editor declaration @@ -66,7 +66,7 @@ public: }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_CODE_EDITOR_H diff --git a/fluid/widgets/Code_Viewer.cxx b/fluid/widgets/Code_Viewer.cxx index fdbfdc626..b3435e448 100644 --- a/fluid/widgets/Code_Viewer.cxx +++ b/fluid/widgets/Code_Viewer.cxx @@ -22,11 +22,11 @@ #include "widgets/Code_Viewer.h" -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; /** - Create a fld::widget::Code_Viewer widget. + Create a fluid::widget::Code_Viewer widget. \param[in] X, Y, W, H position and size of the widget \param[in] L optional label */ diff --git a/fluid/widgets/Code_Viewer.h b/fluid/widgets/Code_Viewer.h index 4198fd433..5b73f53fb 100644 --- a/fluid/widgets/Code_Viewer.h +++ b/fluid/widgets/Code_Viewer.h @@ -25,7 +25,7 @@ #include "widgets/Code_Editor.h" -namespace fld { +namespace fluid { namespace widget { /** @@ -47,6 +47,6 @@ protected: }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_CODE_VIEWER_H diff --git a/fluid/widgets/Formula_Input.cxx b/fluid/widgets/Formula_Input.cxx index dadebe674..9a9a69b87 100644 --- a/fluid/widgets/Formula_Input.cxx +++ b/fluid/widgets/Formula_Input.cxx @@ -23,10 +23,10 @@ #include #include -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; -/** \class fld::widget::Formula_Input +/** \class fluid::widget::Formula_Input The Formula_Input widget is an input field for entering widget coordinates and sizes. It includes basic math capabilities and allows the use of variables in formulas. This widget is useful for specifying precise positions and diff --git a/fluid/widgets/Formula_Input.h b/fluid/widgets/Formula_Input.h index 5df30b5af..5466561f2 100644 --- a/fluid/widgets/Formula_Input.h +++ b/fluid/widgets/Formula_Input.h @@ -19,7 +19,7 @@ #include -namespace fld { +namespace fluid { namespace widget { class Formula_Input; @@ -63,11 +63,11 @@ public: /** Set the general callback for this widget. */ void callback(Fl_Callback *cb) { user_callback_ = cb; } - void variables(fld::widget::Formula_Input_Vars *vars, void *user_data); + void variables(fluid::widget::Formula_Input_Vars *vars, void *user_data); int handle(int) override; }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_FORMULA_INPUT_H diff --git a/fluid/widgets/Node_Browser.cxx b/fluid/widgets/Node_Browser.cxx index 91611f876..0ff026021 100644 --- a/fluid/widgets/Node_Browser.cxx +++ b/fluid/widgets/Node_Browser.cxx @@ -28,10 +28,10 @@ // ---- global variables /// Global access to the widget browser. -fld::widget::Node_Browser *widget_browser = nullptr; +fluid::widget::Node_Browser *widget_browser = nullptr; -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; /** diff --git a/fluid/widgets/Node_Browser.h b/fluid/widgets/Node_Browser.h index eec1e7960..f77720e3c 100644 --- a/fluid/widgets/Node_Browser.h +++ b/fluid/widgets/Node_Browser.h @@ -21,7 +21,7 @@ class Node; -namespace fld { +namespace fluid { namespace widget { class Node_Browser : public Fl_Browser_ @@ -74,7 +74,7 @@ public: }; } // namespace widget -} // namespace fld +} // namespace fluid extern void redraw_browser(); extern Fl_Widget *make_widget_browser(int x,int y,int w,int h); @@ -84,6 +84,6 @@ extern void select_only(Node *o); extern void deselect(); extern void reveal_in_browser(Node *t); -extern fld::widget::Node_Browser *widget_browser; +extern fluid::widget::Node_Browser *widget_browser; #endif // FLUID_WIDGETS_NODE_BROWSER_H diff --git a/fluid/widgets/Style_Parser.cxx b/fluid/widgets/Style_Parser.cxx index 9929cc01a..1bf86c8a9 100644 --- a/fluid/widgets/Style_Parser.cxx +++ b/fluid/widgets/Style_Parser.cxx @@ -22,8 +22,8 @@ #include #include // bsearch() -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; // Sorted list of C/C++ keywords... static const char * const code_keywords[] = { diff --git a/fluid/widgets/Style_Parser.h b/fluid/widgets/Style_Parser.h index 287ea6b21..4e1e28a55 100644 --- a/fluid/widgets/Style_Parser.h +++ b/fluid/widgets/Style_Parser.h @@ -18,7 +18,7 @@ #ifndef FLUID_WIDGETS_STYLE_PARSER_H #define FLUID_WIDGETS_STYLE_PARSER_H -namespace fld { +namespace fluid { namespace widget { // Class to manage style parsing, friend of Code_Editor @@ -54,6 +54,6 @@ public: }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_STYLE_PARSER_H diff --git a/fluid/widgets/Text_Viewer.cxx b/fluid/widgets/Text_Viewer.cxx index 5ae821d6b..5680c72c0 100644 --- a/fluid/widgets/Text_Viewer.cxx +++ b/fluid/widgets/Text_Viewer.cxx @@ -20,11 +20,11 @@ #include "widgets/Text_Viewer.h" -using namespace fld; -using namespace fld::widget; +using namespace fluid; +using namespace fluid::widget; /** - Create a fld::widget::Text_Viewer widget. + Create a fluid::widget::Text_Viewer widget. \param[in] X, Y, W, H position and size of the widget \param[in] L optional label */ diff --git a/fluid/widgets/Text_Viewer.h b/fluid/widgets/Text_Viewer.h index 98fa9200f..e00752c4b 100644 --- a/fluid/widgets/Text_Viewer.h +++ b/fluid/widgets/Text_Viewer.h @@ -23,7 +23,7 @@ #include -namespace fld { +namespace fluid { namespace widget { /** @@ -40,6 +40,6 @@ public: }; } // namespace widget -} // namespace fld +} // namespace fluid #endif // FLUID_WIDGETS_TEXT_VIEWER_H