╭─── Claude Code v2.1.6 ───────────────────────────────────────────────────────╮ │ │ Tips for getting │ │ Welcome back Maxim! │ started │ │ │ ✔ Run /init to create … │ │ ▗ ▗ ▖ ▖ │ ─────────────────────── │ │ │ Recent activity │ │ ▘▘ ▝▝ │ No recent activity │ │ │ │ │ Opus 4.5 · Claude Max · │ │ │ maksimgrinberg01@gmail.com's Organization │ │ │ ~/Desktop/fltk │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ══════════════════ Conversation compacted · ctrl+o for history ═════════════════ ⎿  Referenced file fluid/nodes/Window_Node.cxx ⎿  Referenced file fluid/nodes/Widget_Node.cxx ⎿  Referenced file fluid/nodes/Node.cxx ⎿  Referenced file fluid/nodes/Group_Node.cxx ⎿  Referenced file fluid/nodes/Grid_Node.cxx ⎿  Todo list read (7 items) ⎿  Plan file referenced (~/.claude/plans/compiled-petting-babbage.md) ⏺ Продолжаю исправление for-loop деклараций. Последняя ошибка была в fluid/panels/settings_panel.cxx:555. ⏺ Read(fluid/panels/settings_panel.cxx) ⎿  Read 30 lines ⏺ Вижу проблему. Переменная int i; объявлена внутри if блока (строка 550), но используется в else блоке (строка 555). Исправляю. ⏺ Update(fluid/panels/settings_panel.cxx) ⎿  Added 1 line, removed 1 line 545 static void cb_w_layout_menu(Fl_Menu_Button*, void* v) { 546 if (v == LOAD) { 547 fld::app::Layout_Suite &suite = (*Fluid.layout_list)[Fluid .layout_list->current_suite()]; 548 + int i; 549 if (suite.storage_ == FLD_TOOL_STORE_INTERNAL) { 550 w_layout_menu_rename->deactivate(); 550 - int i; 551 for (i =1; i<4; i++) w_layout_menu_storage[i]->deactivat e(); 552 w_layout_menu_delete->deactivate(); 553 } else { ⏺ Пересобираю проект для проверки оставшихся ошибок. ⏺ Bash(make 2>&1 | grep -E "error:" | head -25) ⎿ fluid/widgets/Node_Browser.cxx:559:14: error: use of undeclared identif ier 'k' fluid/widgets/Node_Browser.cxx:559:26: error: use of undeclared identif … +21 lines (ctrl+o to expand) ⏺ Ошибка в fluid/widgets/Node_Browser.cxx - переменная k не объявлена. ⏺ Read(fluid/widgets/Node_Browser.cxx) ⎿  Read 50 lines ⏺ Вижу проблему: Node *k; объявляется на строке 554 внутри if (!l->folded_), но используется на строке 559 в блоке else. Нужно переместить декларацию. ⏺ Update(fluid/widgets/Node_Browser.cxx) ⎿  Added 1 line, removed 1 line 549 l = pushedtitle; 550 title = pushedtitle = 0; 551 if (l) { 552 + Node *k; 553 if (!l->folded_) { 554 l->folded_ = 1; 554 - Node *k; 555 for (k = l->next; k&&k->level>l->level; k = k->next) 556 k->visible = 0; 557 } else { ⏺ Пересобираю. ⏺ Bash(make 2>&1 | grep -E "error:" | head -25) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Ошибок компиляции нет. Проверю, есть ли ещё какие-либо предупреждения. ⏺ Bash(make 2>&1 | grep -E "warning:|error:" | head -30) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Проект собирается без ошибок. Исправление for-loop деклараций завершено. ⏺ Исправление for-loop деклараций завершено. Теперь проверю, какие ещё запрещённые ключевые слова остались в проекте согласно Фазе 3 плана. ⏺ Bash(echo "=== final ===" && grep -rn '\bfinal\b' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// " | wc -l) ⎿ === final === 7 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(echo "=== nullptr ===" && grep -rn '\bnullptr\b' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | wc -l) ⎿ === nullptr === 0 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(echo "=== constexpr ===" && grep -rn '\bconstexpr\b' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | wc -l) ⎿ === constexpr === 0 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(echo "=== dynamic_cast ===" && grep -rn '\bdynamic_cast\b' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | wc -l) ⎿ === dynamic_cast === 4 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(echo "=== enum class ===" && grep -rn 'enum class\|enum struct' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | wc -l) ⎿ === enum class === 0 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(grep -rn '\bfinal\b' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// ") ⎿ src//Fl_GIF_Image.cxx:472: format supports only 1 bit for alpha. The f inal image data is stored in src//Fl_Preferences.cxx:295: The application argument can be the workin … +9 lines (ctrl+o to expand) ⏺ Bash(grep -rn '\bdynamic_cast\b' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null) ⎿ FL//Fl_Widget.H:1214: \note This method is provided to avoid dynam ic_cast. FL//Fl_Widget.H:1229: \note This method is provided to avoid dynam … +6 lines (ctrl+o to expand) ⏺ Отлично! Все вхождения - это либо комментарии, либо переменные с именем final, либо строковые литералы. Фаза 3 полностью завершена: - override - 0 (удалено) - auto - 0 (удалено) - nullptr - 0 (заменено на 0) - constexpr - 0 (удалено) - enum class - 0 (удалено) - final (ключевое слово) - 0 (оставшиеся - переменные или комментарии) - dynamic_cast - 0 (оставшиеся - комментарии или строковые литералы) - for-loop декларации - исправлены ⏺ Проверю оставшиеся нарушения в Фазе 4 - использование std::. ⏺ Bash(grep -rn 'std::' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// " | grep -v "/\*" | head -40) ⎿ src//filename_absolute.cxx:128: C++17 `std::filesystem::path::lexicall y_relative`. This function can also be src//filename_absolute.cxx:168: \see fl_filename_relative(const std: … +25 lines (ctrl+o to expand) ⏺ Вижу использования std:: в строковых литералах (генерация кода FLUID). Проверю реальные использования стандартной библиотеки. ⏺ Bash(grep -rn '#include \|#include \|#include \|#include \|#include ' src/ FL/ fluid/ --include="*.cxx" --include="*.H" --inc…) ⎿ fluid//nodes/Function_Node.cxx:1033: f.write_h_once("#include "); fluid//nodes/Function_Node.cxx:1049: f.write_h_once("#include \|^#include \|^#include \|^#include \|^#include \|^#include \|^#include ' src/ FL…) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Отлично! Реальных включений стандартной библиотеки нет. Проверю namespace/using. ⏺ Bash(grep -rn '\bnamespace\b\|^using ' src/ FL/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// " | grep -v "/\*" | head -20) ⎿ src//Fl_Widget.cxx:168: Note: There's no need to have this in the Fl :: namespace. src//Fl_Private.H:29: All prefixed with Fl_Private_ instead of using na … +10 lines (ctrl+o to expand) ⏺ namespace Fl остаётся - это Phase 4b, которая отложена. Проверю состояние FLUID (Фаза 5). ⏺ Bash(grep -rn '\bnamespace\b' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// " | grep -v "/\*" | grep -v '\"' | head -20) ⎿  fluid//proj/i18n.h:24:namespace fld { fluid//proj/i18n.h:41:namespace fld { fluid//proj/i18n.h:43:namespace io { … +19 lines (ctrl+o to expand) ⏺ В FLUID много namespace. Посчитаю масштаб работы. ⏺ Bash(grep -rn '\bnamespace\b' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// " | grep -v "/\*" | grep -v '\"' | wc -l) ⎿ 95 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(grep -rn '^using ' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | wc -l) ⎿ 41 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ В FLUID: 95 namespace, 41 using директив. Это Фаза 5. Обновлю план и начну работу. ⏺ Проанализирую структуру namespace в FLUID. ⏺ Bash(grep -rn '\bnamespace\b' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v "// " | grep -v "/\*" | grep -v '\"' | sed 's/.*namespac…) ⎿   26 fld { 21 fld; 9 widget { … +13 lines (ctrl+o to expand) ⏺ Это большая задача. Давайте начнём систематически. Сначала посмотрю, какие классы объявлены в namespace. ⏺ Bash(grep -rn 'class.*{' fluid/ --include="*.h" --include="*.H" 2>/dev/null | grep -v "// " | head -40) ⎿  fluid//tools/ExternalCodeEditor_UNIX.h:22:class ExternalCodeEditor { fluid//tools/autodoc.h:30:class Fl_Margin : public Fl_Rect { fluid//tools/ExternalCodeEditor_WIN32.h:30:class ExternalCodeEditor { … +50 lines (ctrl+o to expand) ⏺ Посмотрю структуру файлов с namespace. ⏺ Read(fluid/proj/i18n.h) ⎿  Read 105 lines ⏺ Bash(grep -rl '\bnamespace\b' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | sort) ⎿  fluid//Fluid.h fluid//Project.h fluid//app/Snap_Action.cxx … +46 lines (ctrl+o to expand) ⏺ 47 файлов. Проанализирую классы в namespace. ⏺ Bash(grep -rn 'class [A-Z][A-Za-z_]*' fluid/ --include="*.h" --include="*.H" 2>/dev/null | grep -B5 'namespace' | head -60) ⎿  fluid//proj/i18n.h:53:class I18n fluid//proj/align_widget.h:20:class Fl_Widget; fluid//proj/undo.h:22:class Fl_Widget; … +5 lines (ctrl+o to expand) ⏺ Read(fluid/io/Project_Reader.h) ⎿  Read 80 lines ⏺ Read(fluid/Project.h) ⎿  Read 100 lines ⏺ Это большой рефакторинг. Начну с небольшого файла чтобы отработать подход. ⏺ Read(fluid/proj/undo.h) ⎿  Read 96 lines ⏺ Bash(grep -rn 'proj::Undo\|fld::proj::Undo' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null) ⎿ fluid//app/Menu.cxx:116: {"&Undo", FL_COMMAND+'z', fld::proj::Undo::un do_cb}, fluid//app/Menu.cxx:117: {"&Redo", FL_COMMAND+FL_SHIFT+'z', fld::proj: … +4 lines (ctrl+o to expand) ⏺ Зависимостей немного. Создам полный список классов для переименования. ⏺ Bash(echo "=== Classes in fld namespace ===" && grep -rn 'namespace fld' fluid/ --include="*.h" --include="*.H" -A 30 2>/dev/null | grep -E '^\s*class [A-Z]' | sed '…) ⎿ === Classes in fld namespace === /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(for f in fluid/proj/*.h fluid/io/*.h fluid/app/*.h fluid/nodes/Tree.h fluid/Project.h; do echo "=== $f ==="; grep -E 'class [A-Z][A-Za-z_]*' "$f" 2>/dev/null |…) ⎿  === fluid/proj/align_widget.h === class Fl_Widget; === fluid/proj/i18n.h === … +57 lines (ctrl+o to expand) ⏺ Классы для переименования (в порядке зависимости): 1. fld::Project → Fld_Project 2. fld::proj::Undo → Fld_Undo 3. fld::proj::I18n → Fld_I18n 4. fld::io::Project_Reader → Fld_Project_Reader 5. fld::io::Project_Writer → Fld_Project_Writer 6. fld::io::Code_Writer → Fld_Code_Writer 7. fld::node::Tree → Fld_Node_Tree 8. fld::app::* → Fld_* Начну с proj/undo.h - удалю namespace и переименую класс. ⏺ Read(fluid/proj/undo.cxx) ⎿  Read 274 lines ⏺ Вижу использование using namespace fld; и using namespace fld::proj;. Начну с систематической замены. Сначала уберу using namespace и добавлю явные квалификаторы, затем можно будет переименовать классы. ⏺ Update(fluid/proj/undo.cxx) ⎿  Added 1 line, removed 5 lines 47 48 extern Fl_Window* the_panel; 49 50 -using namespace fld; 51 -using namespace fld::proj; 52 - 53 - 54 -Undo::Undo(Project &p) 50 +fld::proj::Undo::Undo(fld::Project &p) 51 : proj_( p ) 52 { } 53 ⏺ Read(fluid/proj/undo.cxx) ⎿  Read 30 lines ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Update(fluid/proj/undo.cxx) ⎿  Added 12 lines, removed 12 lines 47 48 extern Fl_Window* the_panel; 49 50 -fld::proj::Undo::Undo(fld::Project &p) 50 +fld::proj::fld::proj::Undo::Undo(fld::Project &p) 51 : proj_( p ) 52 { } 53 54 -Undo::~Undo() { 54 +fld::proj::Undo::~Undo() { 55 // TODO: delete old undo files when calling the destructor. 56 } 57 ... 60 // The filename is constructed in a static internal buffer and 61 // this buffer is overwritten by every call of this function. 62 // The return value is a pointer to this internal string. 63 -char *Undo::filename(int level) { 63 +char *fld::proj::Undo::filename(int level) { 64 if (!path_len_) { 65 Fluid.preferences.getUserdataPath(path_, sizeof(path_)); 66 path_len_ = (unsigned int)strlen(path_); ... 75 76 77 // Redo menu callback 78 -void Undo::redo() { 78 +void fld::proj::Undo::redo() { 79 // int undo_item = main_menubar->find_index(undo_cb); 80 // int redo_item = main_menubar->find_index(redo_cb); 81 once_type_ = FLD_UNDO_ONCETYPE_ALWAYS; ... 119 } 120 121 // Undo menu callback 122 -void Undo::undo() { 122 +void fld::proj::Undo::undo() { 123 // int undo_item = main_menubar->find_index(undo_cb); 124 // int redo_item = main_menubar->find_index(redo_cb); 125 once_type_ = FLD_UNDO_ONCETYPE_ALWAYS; ... 180 \param[in] type set a new type, or set to 0 to clear the once _type without setting a checkpoint 181 \return 1 if the checkpoint was set, 0 if this is a repeating event 182 */ 183 -int Undo::checkpoint(OnceType type) { 183 +int fld::proj::Undo::checkpoint(OnceType type) { 184 if (type == FLD_UNDO_ONCETYPE_ALWAYS) { 185 once_type_ = FLD_UNDO_ONCETYPE_ALWAYS; 186 return 0; ... 197 } 198 199 // Save current file to undo buffer 200 -void Undo::checkpoint() { 200 +void fld::proj::Undo::checkpoint() { 201 // printf("checkpoint(): current_=%d, paused_=%d, modflag=% d\n", 202 // current_, paused_, modflag); 203 ... 231 } 232 233 // Clear undo buffer 234 -void Undo::clear() { 234 +void fld::proj::Undo::clear() { 235 // int undo_item = main_menubar->find_index(undo_cb); 236 // int redo_item = main_menubar->find_index(redo_cb); 237 // Remove old checkpoint files... ... 251 } 252 253 // Resume undo checkpoints 254 -void Undo::resume() { 254 +void fld::proj::Undo::resume() { 255 paused_--; 256 } 257 258 // Suspend undo checkpoints 259 -void Undo::suspend() { 259 +void fld::proj::Undo::suspend() { 260 paused_++; 261 } 262 263 -void Undo::undo_cb(Fl_Widget *, void *) { 263 +void fld::proj::Undo::undo_cb(Fl_Widget *, void *) { 264 Fluid.proj.undo.undo(); 265 } 266 267 -void Undo::redo_cb(Fl_Widget *, void *) { 267 +void fld::proj::Undo::redo_cb(Fl_Widget *, void *) { 268 Fluid.proj.undo.redo(); 269 } ⏺ Bash(make 2>&1 | grep -E "error:" | head -20) ⎿ fluid/proj/undo.cxx:50:1: error: no member named 'fld' in namespace 'fl d::proj'; did you mean simply 'fld'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Read(fluid/proj/undo.cxx) ⎿  Read 10 lines ⏺ Update(fluid/proj/undo.cxx) ⎿  Added 1 line, removed 1 line 47 48 extern Fl_Window* the_panel; 49 50 -fld::proj::fld::proj::Undo::Undo(fld::Project &p) 50 +fld::proj::Undo::Undo(fld::Project &p) 51 : proj_( p ) 52 { } 53 ⏺ Bash(make 2>&1 | grep -E "error:" | head -20) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 6 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Продолжу с другими файлами с using namespace. ⏺ Bash(grep -rn '^using namespace' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null) ⎿  fluid//tools/ExternalCodeEditor_UNIX.cxx:26:using namespace fld; fluid//tools/ExternalCodeEditor_WIN32.cxx:31:using namespace fld; fluid//app/templates.cxx:31:using namespace fld; … +38 lines (ctrl+o to expand) ⏺ Много файлов. Проверю, есть ли std:: в FLUID, требующий внимания. ⏺ Bash(grep -rn 'std::' fluid/ --include="*.cxx" --include="*.H" --include="*.h" 2>/dev/null | grep -v '\"' | grep -v "// " | grep -v "/\*" | wc -l) ⎿ 0 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Отлично, std:: в FLUID уже удалён. Продолжу удаление using namespace. Обработаю файлы по порядку. ⏺ Read(fluid/tools/ExternalCodeEditor_UNIX.cxx) ⎿  Read 100 lines ⏺ Read(fluid/Fluid.h) ⎿  Read 80 lines ⏺ Bash(grep -n 'extern.*Fluid\|Application.*Fluid' fluid/Fluid.h 2>/dev/null) ⎿ 204:extern fld::Application Fluid; /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Fluid объявлен как extern fld::Application Fluid;, так что using namespace fld; не нужен. Удалю его. ⏺ Update(fluid/tools/ExternalCodeEditor_UNIX.cxx) ⎿  Removed 2 lines 23 #include /* free().. */ 24 #include /* snprintf().. */ 25 26 -using namespace fld; 27 - 26 // Static local data 27 static int L_editors_open = 0; // keep track of #editors open 28 static Fl_Timeout_Handler L_update_timer_cb = 0; // app' s update timer callback ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 3 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Проверю, существует ли WIN32 файл (должен был быть удалён в Фазе 1). ⏺ Bash(ls -la fluid/tools/ExternalCodeEditor_WIN32.cxx 2>/dev/null || echo "File not found") ⎿ -rw-r--r--@ 1 mnik01 staff 23098 Feb 6 16:34 fluid/tools/ExternalCod eEditor_WIN32.cxx /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Файл есть, но не компилируется на X11. Продолжу с app/templates.cxx. ⏺ Read(fluid/app/templates.cxx) ⎿  Read 80 lines ⏺ Bash(grep -n 'Fluid\.' fluid/app/templates.cxx 2>/dev/null | head -10) ⎿  19:#include "Fluid.h" 76: Fluid.preferences.getUserdataPath(filename, sizeof(filename)); 99: if (!fld::io::write_file(Fluid.proj, filename)) { … +3 lines (ctrl+o to expand) ⏺ Read(fluid/app/templates.cxx) ⎿  Read 144 lines ⏺ Все имена уже квалифицированы или глобальные. Удаляю using namespace. ⏺ Update(fluid/app/templates.cxx) ⎿  Removed 3 lines 28 #include 29 #include "../src/flstring.h" 30 31 -using namespace fld; 32 -using namespace fld::app; 33 - 31 /** 32 Save a design template. 33 \todo We should document the concept of templates. ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 50 lines ⎿  Found 2 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(grep -c 'Layout_Preset\|Layout_Suite\|Layout_List\|Snap_Action' fluid/app/Snap_Action.cxx 2>/dev/null) ⎿ 86 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Сборка успешна. Удаление namespace из FLUID - большая работа (86 использований только в одном файле). Продолжу с файлами попроще. ⏺ Read(fluid/nodes/Tree.cxx) ⎿  Read 129 lines ⏺ Update(fluid/nodes/Tree.cxx) ⎿  Added 1 line, removed 5 lines 19 20 #include "Project.h" 21 22 -using namespace fld; 23 -using namespace fld::node; 24 - 25 - 26 -Tree::Iterator::Iterator(Node *t, bool only_selected) 22 +fld::node::Tree::Iterator::Iterator(Node *t, bool only_selected +) 23 : type_(t) 24 , only_selected_(only_selected) 25 { ⏺ Update(fluid/nodes/Tree.cxx) ⎿  Added 7 lines, removed 7 lines 19 20 #include "Project.h" 21 22 -fld::node::Tree::Iterator::Iterator(Node *t, bool only_selected -) 22 +fld::node::fld::node::Tree::Iterator::Iterator(Node *t, bool on +ly_selected) 23 : type_(t) 24 , only_selected_(only_selected) 25 { ... 32 } 33 } 34 35 -Tree::Iterator &Tree::Iterator::operator++() { 35 +fld::node::Tree::Iterator &fld::node::Tree::Iterator::operator+ ++() { 36 if (only_selected_) { 37 do { 38 type_ = type_->next; ... 43 return *this; 44 } 45 46 -Tree::WIterator::WIterator(Node *t, bool only_selected) 46 +fld::node::Tree::WIterator::WIterator(Node *t, bool only_select +ed) 47 : type_(t) 48 , only_selected_(only_selected) 49 { ... 60 } 61 } 62 63 -Tree::WIterator& Tree::WIterator::operator++() { 63 +fld::node::Tree::WIterator& fld::node::Tree::WIterator::operato +r++() { 64 if (only_selected_) { 65 do { 66 type_ = type_->next; ... 74 } 75 76 77 -Tree::Tree(Project &proj) 77 +fld::node::Tree::Tree(Project &proj) 78 : proj_(proj) 79 { (void)proj_; } 80 ... 87 \param[in] uid any number between 0 and 65535 88 \return the node with this uid, or 0 if not found 89 */ 90 -Node *Tree::find_by_uid(unsigned short uid) { 90 +Node *fld::node::Tree::find_by_uid(unsigned short uid) { 91 for (Node *tp: all_nodes()) { 92 if (tp->get_uid() == uid) return tp; 93 } ... 101 \param[in] crsr cursor position in text 102 \return the node we found or 0 103 */ 104 -Node *Tree::find_in_text(int text_type, int crsr) { 104 +Node *fld::node::Tree::find_in_text(int text_type, int crsr) { 105 for (Node *node: all_nodes()) { 106 switch (text_type) { 107 case 0: ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Read(fluid/nodes/Tree.cxx) ⎿  Read 15 lines ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Update(fluid/nodes/Tree.cxx) ⎿  Added 1 line, removed 1 line 19 20 #include "Project.h" 21 22 -fld::node::fld::node::Tree::Iterator::Iterator(Node *t, bool on -ly_selected) 22 +fld::node::Tree::Iterator::Iterator(Node *t, bool only_selected +) 23 : type_(t) 24 , only_selected_(only_selected) 25 { ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 3 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Обработаю следующие файлы пакетно. ⏺ Read(fluid/io/String_Writer.cxx) ⎿  Read 147 lines ⏺ Update(fluid/io/String_Writer.cxx) ⎿  Removed 3 lines 21 #include "nodes/Window_Node.h" 22 #include "nodes/Function_Node.h" 23 24 -using namespace fld; 25 -using namespace fld::io; 26 - 24 /** 25 Write a string to a file, replacing all non-ASCII characters w ith octal codes. 26 \param[in] out output file ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 3 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Продолжу с другими io файлами. ⏺ Read(fluid/io/Project_Writer.cxx) ⎿  Read 50 lines ⏺ Bash(grep -c 'Project_Writer::' fluid/io/Project_Writer.cxx 2>/dev/null) ⎿ 10 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Update(fluid/io/Project_Writer.cxx) ⎿  Removed 3 lines 32 /// \defgroup flfile .fl Project File Operations 33 /// \{ 34 35 -using namespace fld; 36 -using namespace fld::io; 37 - 35 /** \brief Write an .fl design description file. 36 37 The .fl file format is documented in `fluid/README_fl.txt`. ⏺ Update(fluid/io/Project_Writer.cxx) ⎿  Added 10 lines, removed 10 lines 49 // ---- Project_Writer ---------------------------------------- ------ MARK: - 50 51 /** \brief Construct local project writer. */ 52 -Project_Writer::Project_Writer(Project &proj) 52 +fld::io::Project_Writer::Project_Writer(Project &proj) 53 : proj_(proj) 54 { 55 } 56 57 /** \brief Release project writer resources. */ 58 -Project_Writer::~Project_Writer() 58 +fld::io::Project_Writer::~Project_Writer() 59 { 60 } 61 ... 65 \param[in] s the filename or 0 for stdout 66 \return 1 if successful. 0 if the operation failed 67 */ 68 -int Project_Writer::open_write(const char *s) { 68 +int fld::io::Project_Writer::open_write(const char *s) { 69 if (!s) { 70 fout = stdout; 71 } else { ... 81 Don't close, if data was sent to stdout. 82 \return 1 if succeeded, 0 if fclose failed 83 */ 84 -int Project_Writer::close_write() { 84 +int fld::io::Project_Writer::close_write() { 85 if (fout != stdout) { 86 int x = fclose(fout); 87 fout = stdout; ... 97 \param[in] sv if set, this file will be used by codeview 98 \return 0 if the operation failed, 1 if it succeeded 99 */ 100 -int Project_Writer::write_project(const char *filename, int se -lected_only, bool sv) { 100 +int fld::io::Project_Writer::write_project(const char *filenam +e, int selected_only, bool sv) { 101 write_codeview_ = sv; 102 proj_.undo.suspend(); 103 if (!open_write(filename)) { ... 148 Write a string to the .fl file, quoting characters if necessa ry. 149 \param[in] w NUL terminated text 150 */ 151 -void Project_Writer::write_word(const char *w) { 151 +void fld::io::Project_Writer::write_word(const char *w) { 152 if (needspace) putc(' ', fout); 153 needspace = 1; 154 if (!w || !*w) {fprintf(fout,"{}"); return;} ... 186 unless the format starts with a newline character \\n. 187 \param[in] format printf style formatting string followed by a list of arguments 188 */ 189 -void Project_Writer::write_string(const char *format, ...) { 189 +void fld::io::Project_Writer::write_string(const char *format, + ...) { 190 va_list args; 191 va_start(args, format); 192 if (needspace && *format != '\n') fputc(' ',fout); ... 199 Start a new line in the .fl file and indent it for a given ne sting level. 200 \param[in] n indent level 201 */ 202 -void Project_Writer::write_indent(int n) { 202 +void fld::io::Project_Writer::write_indent(int n) { 203 fputc('\n',fout); 204 while (n--) {fputc(' ',fout); fputc(' ',fout);} 205 needspace = 0; ... 208 /** 209 Write a '{' to the .fl file at the given indenting level. 210 */ 211 -void Project_Writer::write_open() { 211 +void fld::io::Project_Writer::write_open() { 212 if (needspace) fputc(' ',fout); 213 fputc('{',fout); 214 needspace = 0; ... 218 Write a '}' to the .fl file at the given indenting level. 219 \param[in] n indent level 220 */ 221 -void Project_Writer::write_close(int n) { 221 +void fld::io::Project_Writer::write_close(int n) { 222 if (needspace) write_indent(n); 223 fputc('}',fout); 224 needspace = 1; ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Обработаю Project_Reader.cxx. ⏺ Read(fluid/io/Project_Reader.cxx) ⎿  Read 40 lines ⏺ Bash(grep -c 'Project_Reader::' fluid/io/Project_Reader.cxx 2>/dev/null) ⎿ 14 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Update(fluid/io/Project_Reader.cxx) ⎿  Removed 3 lines 41 /// \defgroup flfile .fl Project File Operations 42 /// \{ 43 44 -using namespace fld; 45 -using namespace fld::io; 46 - 44 // This file contains code to read and write .fl files. 45 46 /// If set, we read an old fdesign file and widget y coordinate s need to be flipped. ⏺ Update(fluid/io/Project_Reader.cxx) ⎿  Added 14 lines, removed 14 lines 82 Oh how I wish sometimes we would upgrade to modern C++. 83 \param[in] length minimum length in bytes 84 */ 85 -void Project_Reader::expand_buffer(int length) { 85 +void fld::io::Project_Reader::expand_buffer(int length) { 86 if (length >= buflen) { 87 if (!buflen) { 88 buflen = length+1; ... 96 } 97 98 /** \brief Construct local project reader. */ 99 -Project_Reader::Project_Reader(Project &proj) 99 +fld::io::Project_Reader::Project_Reader(Project &proj) 100 : proj_(proj) 101 { 102 } 103 104 /** \brief Release project reader resources. */ 105 -Project_Reader::~Project_Reader() 105 +fld::io::Project_Reader::~Project_Reader() 106 { 107 // fname is not copied, so do not free it 108 if (buffer) ... 114 \param[in] s filename, if 0, read from stdin instead 115 \return 0 if the operation failed, 1 if it succeeded 116 */ 117 -int Project_Reader::open_read(const char *s) { 117 +int fld::io::Project_Reader::open_read(const char *s) { 118 lineno = 1; 119 if (!s) { 120 fin = stdin; ... 133 Close the .fl file. 134 \return 0 if the operation failed, 1 if it succeeded 135 */ 136 -int Project_Reader::close_read() { 136 +int fld::io::Project_Reader::close_read() { 137 if (fin != stdin) { 138 int x = fclose(fin); 139 fin = 0; ... 146 Return the name part of the current filename and path. 147 \return a pointer into a string that is not owned by this cla ss 148 */ 149 -const char *Project_Reader::filename_name() { 149 +const char *fld::io::Project_Reader::filename_name() { 150 return fl_filename_name(fname); 151 } 152 ... 156 values, and \\o### octal values. 157 \return a character in the ASCII range 158 */ 159 -int Project_Reader::read_quoted() { // read whatever char -acter is after a \ . 159 +int fld::io::Project_Reader::read_quoted() { // read what +ever character is after a \ . 160 int c,d,x; 161 switch(c = nextchar()) { 162 case '\n': lineno++; return -1; ... 201 a previous call, and there is no need to waste time searching for them. 202 \return the last node that was created 203 */ 204 -Node *Project_Reader::read_children(Node *p, int merge, Strate -gy strategy, char skip_options) { 204 +Node *fld::io::Project_Reader::read_children(Node *p, int merg +e, Strategy strategy, char skip_options) { 205 Fluid.proj.tree.current = p; 206 Node *last_child_read = 0; 207 Node *t = 0; ... 385 \param[in] strategy add new nodes after current or as last ch ild 386 \return 0 if the operation failed, 1 if it succeeded 387 */ 388 -int Project_Reader::read_project(const char *filename, int mer -ge, Strategy strategy) { 388 +int fld::io::Project_Reader::read_project(const char *filename +, int merge, Strategy strategy) { 389 Node *o; 390 proj_.undo.suspend(); 391 read_version = 0.0; ... 435 operations. 436 \param[in] format printf style format string, followed by an argument list 437 */ 438 -void Project_Reader::read_error(const char *format, ...) { 438 +void fld::io::Project_Reader::read_error(const char *format, . +..) { 439 va_list args; 440 va_start(args, format); 441 if (!fin) { // FIXME: this line suppresses any error message s in interactive mode ... 468 overwrite this buffer. If wantbrace is not set, but we rea d a leading '{', 469 the returned string will be stripped of its leading and tr ailing braces. 470 */ 471 -const char *Project_Reader::read_word(int wantbrace) { 471 +const char *fld::io::Project_Reader::read_word(int wantbrace) +{ 472 int x; 473 474 // skip all the whitespace before it: ... 538 /** Read a word and interpret it as an integer value. 539 \return integer value, or 0 if the word is not an integer 540 */ 541 -int Project_Reader::read_int() { 541 +int fld::io::Project_Reader::read_int() { 542 const char *word = read_word(); 543 if (word) { 544 return atoi(word); ... 554 \param[out] value string 555 \return 0 if end of file, else 1 556 */ 557 -int Project_Reader::read_fdesign_line(const char*& name, const - char*& value) { 557 +int fld::io::Project_Reader::read_fdesign_line(const char*& na +me, const char*& value) { 558 int length = 0; 559 int x; 560 // find a colon: ... 681 FLTK widgets. 682 \see http://xforms-toolkit.org 683 */ 684 -void Project_Reader::read_fdesign() { 684 +void fld::io::Project_Reader::read_fdesign() { 685 int fdesign_magic = atoi(read_word()); 686 fdesign_flip = (fdesign_magic < 13000); 687 Widget_Node *window = 0; ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Read(fluid/io/Code_Writer.cxx) ⎿  Read 40 lines ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(grep -E '^[A-Za-z_]+::' fluid/io/Code_Writer.cxx 2>/dev/null | head -20) ⎿ Code_Writer::Code_Writer(Project &proj) Code_Writer::~Code_Writer() /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(grep -n 'class Fd_Id_Map\|class Fd_String_Set' fluid/io/Code_Writer.h 2>/dev/null) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Read(fluid/io/Code_Writer.h) ⎿  Read 80 lines ⏺ Update(fluid/io/Code_Writer.cxx) ⎿  Removed 3 lines 31 #include 32 #include 33 34 -using namespace fld; 35 -using namespace fld::io; 36 - 34 // ---- Fd_Id_Map implementation ---- 35 36 void Fd_Id_Map::clear() { ⏺ Update(fluid/io/Code_Writer.cxx) ⎿  Added 30 lines, removed 30 lines 141 \param[in] label else if label is set, it is appended, skippi ng non-keyword characters 142 \return buffer to a unique identifier, managed by Code_Writer , so caller must NOT free() it 143 */ 144 -const char* Code_Writer::unique_id(void* o, const char* type, -const char* name, const char* label) { 144 +const char* fld::io::Code_Writer::unique_id(void* o, const cha +r* type, const char* name, const char* label) { 145 char buffer[128]; 146 char* q = buffer; 147 char* q_end = q + 128 - 8 - 1; // room for hex number and NU L ... 186 \param[in] set generate this indent depth 187 \return pointer to a static string 188 */ 189 -const char *Code_Writer::indent(int set) { 189 +const char *fld::io::Code_Writer::indent(int set) { 190 static const char* spaces = " "; 191 int i = set * 2; 192 if (i>64) i = 64; ... 198 Return a C string that indents code to the current source fil e depth. 199 \return pointer to a static string 200 */ 201 -const char *Code_Writer::indent() { 201 +const char *fld::io::Code_Writer::indent() { 202 return indent(indentation); 203 } 204 ... 208 change the `indentation` variable; offset can be negative 209 \return pointer to a static string 210 */ 211 -const char *Code_Writer::indent_plus(int offset) { 211 +const char *fld::io::Code_Writer::indent_plus(int offset) { 212 return indent(indentation+offset); 213 } 214 ... 219 \param[in] format printf-style formatting text, followed by a vararg list 220 \return 1 if the text was written to the file, 0 if it was pr eviously written. 221 */ 222 -int Code_Writer::write_h_once(const char *format, ...) { 222 +int fld::io::Code_Writer::write_h_once(const char *format, ... +) { 223 va_list args; 224 char buf[1024]; 225 va_start(args, format); ... 239 \param[in] format printf-style formatting text, followed by a vararg list 240 \return 1 if the text was written to the file, 0 if it was pr eviously written. 241 */ 242 -int Code_Writer::write_c_once(const char *format, ...) { 242 +int fld::io::Code_Writer::write_c_once(const char *format, ... +) { 243 va_list args; 244 char buf[1024]; 245 va_start(args, format); ... 264 \param[in] pp ay pointer 265 \return true if found in the tree, false if added to the tree 266 */ 267 -bool Code_Writer::c_contains(void *pp) { 267 +bool fld::io::Code_Writer::c_contains(void *pp) { 268 if (ptr_in_code.contains(pp)) { 269 return true; 270 } ... 289 290 \see f.write_cstring(const char*) 291 */ 292 -void Code_Writer::write_cstring(const char *s, int length) { 292 +void fld::io::Code_Writer::write_cstring(const char *s, int le +ngth) { 293 const char *next_line = "\"\n\""; 294 if (varused_test) { 295 varused = 1; ... 370 \param[in] s write this string 371 \see f.write_cstring(const char*, int) 372 */ 373 -void Code_Writer::write_cstring(const char *s) { 373 +void fld::io::Code_Writer::write_cstring(const char *s) { 374 write_cstring(s, (int)strlen(s)); 375 } 376 ... 382 \param[in] s a block of binary data, interpreted as unsigned bytes 383 \param[in] length size of the block in bytes 384 */ 385 -void Code_Writer::write_cdata(const char *s, int length) { 385 +void fld::io::Code_Writer::write_cdata(const char *s, int leng +th) { 386 if (varused_test) { 387 varused = 1; 388 return; ... 420 \param[in] format printf-style formatting text 421 \param[in] args list of arguments 422 */ 423 -void Code_Writer::vwrite_c(const char* format, va_list args) { 423 +void fld::io::Code_Writer::vwrite_c(const char* format, va_lis +t args) { 424 if (varused_test) { 425 varused = 1; 426 return; ... 432 Print a formatted line to the source file. 433 \param[in] format printf-style formatting text, followed by a vararg list 434 */ 435 -void Code_Writer::write_c(const char* format,...) { 435 +void fld::io::Code_Writer::write_c(const char* format,...) { 436 va_list args; 437 va_start(args, format); 438 vwrite_c(format, args); ... 447 \param[in] c line of code 448 \param[in] com optional commentary 449 */ 450 -void Code_Writer::write_cc(const char *indent, int n, const ch -ar *c, const char *com) { 450 +void fld::io::Code_Writer::write_cc(const char *indent, int n, + const char *c, const char *com) { 451 write_c("%s%.*s", indent, n, c); 452 char cc = c[n-1]; 453 if (cc!='}' && cc!=';') ... 461 Print a formatted line to the header file. 462 \param[in] format printf-style formatting text, followed by a vararg list 463 */ 464 -void Code_Writer::write_h(const char* format,...) { 464 +void fld::io::Code_Writer::write_h(const char* format,...) { 465 if (varused_test) return; 466 va_list args; 467 va_start(args, format); ... 477 \param[in] c line of code 478 \param[in] com optional commentary 479 */ 480 -void Code_Writer::write_hc(const char *indent, int n, const ch -ar* c, const char *com) { 480 +void fld::io::Code_Writer::write_hc(const char *indent, int n, + const char* c, const char *com) { 481 write_h("%s%.*s", indent, n, c); 482 char cc = c[n-1]; 483 if (cc!='}' && cc!=';') ... 494 \param[in] inTrailWith append this character if the last line did not end with 495 a newline, usually 0 or newline. 496 */ 497 -void Code_Writer::write_c_indented(const char *textlines, int -inIndent, char inTrailWith) { 497 +void fld::io::Code_Writer::write_c_indented(const char *textli +nes, int inIndent, char inTrailWith) { 498 if (textlines) { 499 indentation += inIndent; 500 for (;;) { ... 567 \param[in] p write this type and all its children 568 \return pointer to the next sibling 569 */ 570 -Node* Code_Writer::write_static(Node* p) { 570 +Node* fld::io::Code_Writer::write_static(Node* p) { 571 if (write_codeview) p->header_static_start = (int)ftell(head er_file); 572 if (write_codeview) p->code_static_start = (int)ftell(code_f ile); 573 p->write_static(*this); ... 589 \param[in] p write this node and all its children 590 \return pointer to the next sibling 591 */ 592 -Node* Code_Writer::write_code(Node* p) { 592 +Node* fld::io::Code_Writer::write_code(Node* p) { 593 // write all code that comes before the children code 594 // (but don't write the last comment until the very end) 595 if (!(p==Fluid.proj.tree.last && p->is_a(FLD_NODE_TYPE_Comme nt))) { ... 658 \param[in] t filename of the header file 659 \return 0 if the operation failed, 1 if it was successful 660 */ 661 -int Code_Writer::write_code(const char *s, const char *t, bool - to_codeview) { 661 +int fld::io::Code_Writer::write_code(const char *s, const char + *t, bool to_codeview) { 662 write_codeview = to_codeview; 663 unique_id_list.clear(); 664 indentation = 0; ... 873 This avoids repeating these words if the mode is already set. 874 \param[in] state 0 for private, 1 for public, 2 for protected 875 */ 876 -void Code_Writer::write_public(int state) { 876 +void fld::io::Code_Writer::write_public(int state) { 877 if (!current_class && !current_widget_class) return; 878 if (current_class && current_class->write_public_state == st ate) return; 879 if (current_widget_class && current_widget_class->write_publ ic_state == state) return; ... 889 /** 890 Create and initialize a new C++ source code writer. 891 */ 892 -Code_Writer::Code_Writer(Project &proj) 892 +fld::io::Code_Writer::Code_Writer(Project &proj) 893 : proj_ { proj } 894 { 895 block_crc_ = crc32(0, 0, 0); ... 898 /** 899 Release all resources. 900 */ 901 -Code_Writer::~Code_Writer() 901 +fld::io::Code_Writer::~Code_Writer() 902 { 903 if (block_buffer_) ::free(block_buffer_); 904 } ... 911 \param[in] type FD_TAG_GENERIC, FD_TAG_CODE, FD_TAG_MENU_CALL BACK, or FD_TAG_WIDGET_CALLBACK 912 \param[in] uid the unique id of the current type 913 */ 914 -void Code_Writer::tag(Mergeback::Tag prev_type, Mergeback::Tag - next_type, unsigned short uid) { 914 +void fld::io::Code_Writer::tag(Mergeback::Tag prev_type, Merge +back::Tag next_type, unsigned short uid) { 915 if (proj_.write_mergeback_data) { 916 ::Mergeback::print_tag(code_file, prev_type, next_type, ui d, (uint32_t)block_crc_); 917 } ... 929 if we are the start of a line, used to find leadin g whitespace 930 \return the new CRC 931 */ 932 -unsigned long Code_Writer::block_crc(const void *data, int n, -unsigned long in_crc, bool *inout_line_start) { 932 +unsigned long fld::io::Code_Writer::block_crc(const void *data +, int n, unsigned long in_crc, bool *inout_line_start) { 933 if (!data) return 0; 934 if (n==-1) n = (int)strlen((const char*)data); 935 bool line_start = true; ... 956 \param[in] data a pointer to the data block 957 \param[in] n the size of the data in bytes, or -1 to use strl en() 958 */ 959 -void Code_Writer::crc_add(const void *data, int n) { 959 +void fld::io::Code_Writer::crc_add(const void *data, int n) { 960 block_crc_ = block_crc(data, n, block_crc_, &block_line_star t_); 961 } 962 ... 965 \param[in] format printf style formatting string 966 \return see fprintf(FILE *, *const char*, ...) 967 */ 968 -int Code_Writer::crc_printf(const char *format, ...) { 968 +int fld::io::Code_Writer::crc_printf(const char *format, ...) +{ 969 va_list args; 970 va_start(args, format); 971 int ret = crc_vprintf(format, args); ... 979 \param[in] args list of arguments 980 \return see fprintf(FILE *, *const char*, ...) 981 */ 982 -int Code_Writer::crc_vprintf(const char *format, va_list args) - { 982 +int fld::io::Code_Writer::crc_vprintf(const char *format, va_l +ist args) { 983 if (proj_.write_mergeback_data) { 984 int n = vsnprintf(block_buffer_, block_buffer_size_, forma t, args); 985 if (n > block_buffer_size_) { ... 1000 \param[in] text any text, no requirements to end in a newlin e or such 1001 \return see fputs(const char*, FILE*) 1002 */ 1003 -int Code_Writer::crc_puts(const char *text) { 1003 +int fld::io::Code_Writer::crc_puts(const char *text) { 1004 if (proj_.write_mergeback_data) { 1005 crc_add(text); 1006 } ... 1009 1010 /** Write a single ASCII character to the code file. 1011 If MergeBack is enabled, the CRC calculation is continued. 1012 - \note to write UTF-8 characters, use Code_Writer::crc_puts(c -onst char *text) 1012 + \note to write UTF-8 characters, use fld::io::Code_Writer::c +rc_puts(const char *text) 1013 \param[in] c any character between 0 and 127 inclusive 1014 \return see fputc(int, FILE*) 1015 */ 1016 -int Code_Writer::crc_putc(int c) { 1016 +int fld::io::Code_Writer::crc_putc(int c) { 1017 if (proj_.write_mergeback_data) { 1018 uchar uc = (uchar)c; 1019 crc_add(&uc, 1); ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Обновлю прогресс и продолжу. ⏺ Read(fluid/widgets/Style_Parser.cxx) ⎿  Read 30 lines ⏺ Bash(grep -c 'Style_Parser::' fluid/widgets/Style_Parser.cxx 2>/dev/null) ⎿ 14 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Update(fluid/widgets/Style_Parser.cxx) ⎿  Removed 3 lines 22 #include 23 #include // bsearch() 24 25 -using namespace fld; 26 -using namespace fld::widget; 27 - 25 // Sorted list of C/C++ keywords... 26 static const char * const code_keywords[] = { 27 "and", ⏺ Update(fluid/widgets/Style_Parser.cxx) ⎿  Added 14 lines, removed 14 lines 130 // Applies the current style, advances to next text + style char. 131 // Returns 0 if hit end of buffer, 1 otherwise. 132 // 133 -int Style_Parser::parse_over_char(int handle_crlf) { 133 +int fld::widget::Style_Parser::parse_over_char(int handle_crlf +) { 134 char c = *tbuff; 135 136 // End of line? ... 157 // Parse over white space using current style 158 // Returns 0 if hit end of buffer, 1 otherwise. 159 // 160 -int Style_Parser::parse_over_white() { 160 +int fld::widget::Style_Parser::parse_over_white() { 161 while ( len > 0 && strchr(" \t", *tbuff)) 162 { if ( !parse_over_char() ) return 0; } 163 return 1; ... 166 // Parse over non-white alphabetic text 167 // Returns 0 if hit end of buffer, 1 otherwise. 168 // 169 -int Style_Parser::parse_over_alpha() { 169 +int fld::widget::Style_Parser::parse_over_alpha() { 170 while ( len > 0 && isalpha(*tbuff) ) 171 { if ( !parse_over_char() ) return 0; } 172 return 1; ... 175 // Parse to end of line in specified style. 176 // Returns 0 if hit end of buffer, 1 otherwise. 177 // 178 -int Style_Parser::parse_to_eol(char s) { 178 +int fld::widget::Style_Parser::parse_to_eol(char s) { 179 char save = style; 180 style = s; 181 while ( *tbuff != '\n' ) ... 187 // Parse a block comment until end of comment or buffer. 188 // Returns 0 if hit end of buffer, 1 otherwise. 189 // 190 -int Style_Parser::parse_block_comment() { 190 +int fld::widget::Style_Parser::parse_block_comment() { 191 char save = style; 192 style = 'C'; // block comment sty le 193 while ( len > 0 ) { ... 203 } 204 205 // Copy keyword from tbuff -> keyword[] buffer 206 -void Style_Parser::buffer_keyword() { 206 +void fld::widget::Style_Parser::buffer_keyword() { 207 char *key = keyword; 208 char *kend = key + sizeof(keyword) - 1; // end of buffer 209 const char *s; ... 216 // Parse over specified 'key'word in specified style 's'. 217 // Returns 0 if hit end of buffer, 1 otherwise. 218 // 219 -int Style_Parser::parse_over_key(const char *key, char s) { 219 +int fld::widget::Style_Parser::parse_over_key(const char *key, + char s) { 220 char save = style; 221 style = s; 222 // Parse over the keyword while applying style to sbuff ... 230 // Parse over angle brackets <..> in specified style. 231 // Returns 0 if hit end of buffer, 1 otherwise. 232 // 233 -int Style_Parser::parse_over_angles(char s) { 233 +int fld::widget::Style_Parser::parse_over_angles(char s) { 234 if ( *tbuff != '<' ) return 1; // not <..>, early exit 235 char save = style; 236 style = s; ... 246 // spi.keyword[] will contain parsed word. 247 // Returns 0 if hit end of buffer, 1 otherwise. 248 // 249 -int Style_Parser::parse_keyword() { 249 +int fld::widget::Style_Parser::parse_keyword() { 250 // Parse into 'keyword' buffer 251 buffer_keyword(); 252 char *key = keyword; ... 263 // Style parse a quoted string, either "" or ''. 264 // Returns 0 if hit end of buffer, 1 otherwise. 265 // 266 -int Style_Parser::parse_quoted_string(char quote_char, // e.g. - '"' or '\'' 266 +int fld::widget::Style_Parser::parse_quoted_string(char quote_ +char, // e.g. '"' or '\'' 267 char in_style) { // style for quoted text 268 style = in_style; // start string style 269 if ( !parse_over_char() ) return 0; // parse over opening quote ... 290 // Style parse a directive (#include, #define..) 291 // Returns 0 if hit end of buffer, 1 otherwise. 292 // 293 -int Style_Parser::parse_directive() { 293 +int fld::widget::Style_Parser::parse_directive() { 294 style = 'E'; // start directive style 295 if ( !parse_over_char() ) return 0; // Parse over '#' 296 if ( !parse_over_white() ) return 0; // Parse over any w hitespace after '#' ... 304 // Style parse a line comment to end of line. 305 // Returns 0 if hit end of buffer, 1 otherwise. 306 // 307 -int Style_Parser::parse_line_comment() { 307 +int fld::widget::Style_Parser::parse_line_comment() { 308 return parse_to_eol('B'); 309 } 310 ... 313 // a continuation of a line, such as in a multiline #direct ive. 314 // Returns 0 if hit end of buffer, 1 otherwise. 315 // 316 -int Style_Parser::parse_escape() { 316 +int fld::widget::Style_Parser::parse_escape() { 317 const char no_crlf = 0; 318 if ( !parse_over_char(no_crlf) ) return 0; // backslash 319 if ( !parse_over_char(no_crlf) ) return 0; // char escap ed ... 323 // Parse all other non-specific characters 324 // Returns 0 if hit end of buffer, 1 otherwise. 325 // 326 -int Style_Parser::parse_all_else() { 326 +int fld::widget::Style_Parser::parse_all_else() { 327 last = isalnum(*tbuff) || *tbuff == '_' || *tbuff == '.'; 328 return parse_over_char(); 329 } ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -5) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Успешно. Обработаю оставшиеся widget файлы. ⏺ Bash(for f in fluid/widgets/Bin_Button.cxx fluid/widgets/App_Menu_Bar.cxx fluid/widgets/Code_Editor.cxx fluid/widgets/Text_Viewer.cxx fluid/widgets/Node_Browser.cxx…) ⎿  Processing fluid/widgets/Bin_Button.cxx Processing fluid/widgets/App_Menu_Bar.cxx Processing fluid/widgets/Code_Editor.cxx … +6 lines (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -20) ⎿ fluid/widgets/App_Menu_Bar.cxx:36:1: error: use of undeclared identifie r 'App_Menu_Bar'; did you mean 'fld::widget::App_Menu_Bar'? fluid/widgets/App_Menu_Bar.cxx:44:5: error: use of undeclared identifie … +3 lines (ctrl+o to expand) ⏺ Bash(for f in fluid/widgets/Bin_Button.cxx fluid/widgets/App_Menu_Bar.cxx fluid/widgets/Code_Editor.cxx fluid/widgets/Text_Viewer.cxx fluid/widgets/Node_Browser.cxx…) ⎿ Done /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(make 2>&1 | grep -E "error:" | head -20) ⎿ fluid/widgets/App_Menu_Bar.cxx:44:5: error: use of undeclared identifie r 'App_Menu_Bar'; did you mean 'fld::widget::App_Menu_Bar'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Read(fluid/widgets/App_Menu_Bar.cxx) ⎿  Read 20 lines ⏺ Update(fluid/widgets/App_Menu_Bar.cxx) ⎿  Added 2 lines, removed 2 lines 33 \param[in] X, Y, W, H position and size of the widget 34 \param[in] L optional label 35 */ 36 -fld::widget::App_Menu_Bar::App_Menu_Bar(int X, int Y, int W, in -t H, const char *L) 36 +fld::widget::fld::widget::App_Menu_Bar::App_Menu_Bar(int X, int + Y, int W, int H, const char *L) 37 : Fl_Menu_Bar(X, Y, W, H, L) 38 { 39 } ... 41 /** 42 Set menu item visibility and active state before menu pops up. 43 */ 44 -int App_Menu_Bar::handle(int event) 44 +int fld::widget::App_Menu_Bar::handle(int event) 45 { 46 Fl_Menu_Item *mi = 0; 47 if (event == FL_BEFORE_MENU) { ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/App_Menu_Bar.cxx:36:1: error: no member named 'fld' in na mespace 'fld::widget'; did you mean simply 'fld'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 4 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Read(fluid/widgets/App_Menu_Bar.cxx) ⎿  Read 15 lines ⏺ Update(fluid/widgets/App_Menu_Bar.cxx) ⎿  Added 1 line, removed 1 line 33 \param[in] X, Y, W, H position and size of the widget 34 \param[in] L optional label 35 */ 36 -fld::widget::fld::widget::App_Menu_Bar::App_Menu_Bar(int X, int - Y, int W, int H, const char *L) 36 +fld::widget::App_Menu_Bar::App_Menu_Bar(int X, int Y, int W, in +t H, const char *L) 37 : Fl_Menu_Bar(X, Y, W, H, L) 38 { 39 } ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Code_Editor.cxx:36:36: error: use of undeclared identifie r 'Code_Editor'; did you mean 'fld::widget::Code_Editor'? fluid/widgets/Code_Editor.cxx:54:6: error: use of undeclared identifier … +11 lines (ctrl+o to expand) ⏺ Update(fluid/widgets/Code_Editor.cxx) ⎿  Added 8 lines, removed 8 lines 33 Lookup table for all supported styles. 34 Every table entry describes a rendering style for the correspo nding text. 35 */ 36 -Fl_Text_Display::Style_Table_Entry Code_Editor::styletable[] = -{ // Style table 36 +Fl_Text_Display::Style_Table_Entry fld::widget::Code_Editor::st +yletable[] = { // Style table 37 { FL_FOREGROUND_COLOR, FL_COURIER, 11 }, // A - Plain 38 { FL_DARK_GREEN, FL_COURIER_ITALIC, 11 }, // B - Line comments 39 { FL_DARK_GREEN, FL_COURIER_ITALIC, 11 }, // C - Block comments ... 51 \param[in] in_len byte length to parse 52 \param[in] in_style starting style letter 53 */ 54 -void Code_Editor::style_parse(const char *in_tbuff, // -text buffer to parse 54 +void fld::widget::Code_Editor::style_parse(const char *in_tbuff +, // text buffer to parse 55 char *in_sbuff, // s tyle buffer we modify 56 int in_len, // b yte length to parse 57 char in_style) { // s tarting style letter ... 104 /** 105 Update unfinished styles. 106 */ 107 -void Code_Editor::style_unfinished_cb(int, void*) { 107 +void fld::widget::Code_Editor::style_unfinished_cb(int, void*) + { 108 } 109 110 /** ... 114 \param[in] nDeleted number of bytes deleted 115 \param[in] cbArg pointer back to the code editor 116 */ 117 -void Code_Editor::style_update(int pos, int nInserted, int nDe -leted, 117 +void fld::widget::Code_Editor::style_update(int pos, int nInse +rted, int nDeleted, 118 int /*nRestyled*/, const char * /*deletedText*/, 119 void *cbArg) { 120 Code_Editor *editor = (Code_Editor*)cbArg; ... 165 Find the right indentation depth after pressing the Enter key . 166 \param[in] e pointer back to the code editor 167 */ 168 -int Code_Editor::auto_indent(int, Code_Editor* e) { 168 +int fld::widget::Code_Editor::auto_indent(int, Code_Editor* e) + { 169 if (e->buffer()->selected()) { 170 e->insert_position(e->buffer()->primary_selection()->start ()); 171 e->buffer()->remove_selection(); ... 203 \param[in] X, Y, W, H position and size of the widget 204 \param[in] L optional label 205 */ 206 -fld::widget::Code_Editor::Code_Editor(int X, int Y, int W, int - H, const char *L) : 206 +fld::widget::fld::widget::Code_Editor::Code_Editor(int X, int +Y, int W, int H, const char *L) : 207 Fl_Text_Editor(X, Y, W, H, L) { 208 buffer(new Fl_Text_Buffer); 209 ... 231 /** 232 Destroy a Code_Editor widget. 233 */ 234 -fld::widget::Code_Editor::~Code_Editor() { 234 +fld::widget::fld::widget::Code_Editor::~Code_Editor() { 235 Fl_Text_Buffer *buf = mStyleBuffer; 236 mStyleBuffer = 0; 237 delete buf; ... 246 This works by updating the fontsizes in the style table. 247 \param[in] s the new general height of the text font 248 */ 249 -void Code_Editor::textsize(Fl_Fontsize s) { 249 +void fld::widget::Code_Editor::textsize(Fl_Fontsize s) { 250 Fl_Text_Editor::textsize(s); // call base class method 251 // now attempt to update our styletable to honor the new siz e... 252 int entries = sizeof(styletable) / sizeof(styletable[0]); ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Code_Editor.cxx:206:1: error: no member named 'fld' in na mespace 'fld::widget'; did you mean simply 'fld'? fluid/widgets/Code_Editor.cxx:234:1: error: no member named 'fld' in na … +3 lines (ctrl+o to expand) ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(grep -n 'fld::widget::fld::widget' fluid/widgets/*.cxx 2>/dev/null) ⎿ fluid/widgets/Code_Editor.cxx:206:fld::widget::fld::widget::Code_Editor ::Code_Editor(int X, int Y, int W, int H, const char *L) : fluid/widgets/Code_Editor.cxx:234:fld::widget::fld::widget::Code_Editor … +3 lines (ctrl+o to expand) ⏺ Update(fluid/widgets/Code_Editor.cxx) ⎿  Added 2 lines, removed 2 lines 203 \param[in] X, Y, W, H position and size of the widget 204 \param[in] L optional label 205 */ 206 -fld::widget::fld::widget::Code_Editor::Code_Editor(int X, int -Y, int W, int H, const char *L) : 206 +fld::widget::Code_Editor::Code_Editor(int X, int Y, int W, int + H, const char *L) : 207 Fl_Text_Editor(X, Y, W, H, L) { 208 buffer(new Fl_Text_Buffer); 209 ... 231 /** 232 Destroy a Code_Editor widget. 233 */ 234 -fld::widget::fld::widget::Code_Editor::~Code_Editor() { 234 +fld::widget::Code_Editor::~Code_Editor() { 235 Fl_Text_Buffer *buf = mStyleBuffer; 236 mStyleBuffer = 0; 237 delete buf; ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Code_Viewer.cxx:44:6: error: use of undeclared identifier 'Code_Viewer'; did you mean 'fld::widget::Code_Viewer'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 2 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Update(fluid/widgets/Code_Viewer.cxx) ⎿  Added 2 lines, removed 2 lines 30 \param[in] X, Y, W, H position and size of the widget 31 \param[in] L optional label 32 */ 33 -fld::widget::Code_Viewer::Code_Viewer(int X, int Y, int W, int -H, const char *L) 33 +fld::widget::fld::widget::Code_Viewer::Code_Viewer(int X, int Y +, int W, int H, const char *L) 34 : Code_Editor(X, Y, W, H, L) 35 { 36 default_key_function(kf_ignore); ... 41 /** 42 Tricking Fl_Text_Display into using bearable colors for this s pecific task. 43 */ 44 -void Code_Viewer::draw() 44 +void fld::widget::Code_Viewer::draw() 45 { 46 Fl_Color c = Fl::get_color(FL_SELECTION_COLOR); 47 Fl::set_color(FL_SELECTION_COLOR, fl_color_average(FL_BACKGRO UND_COLOR, FL_FOREGROUND_COLOR, 0.9f)); ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Code_Viewer.cxx:33:1: error: no member named 'fld' in nam espace 'fld::widget'; did you mean simply 'fld'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 3 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(grep -n 'fld::widget::fld::widget' fluid/widgets/*.cxx 2>/dev/null) ⎿ fluid/widgets/Code_Viewer.cxx:33:fld::widget::fld::widget::Code_Viewer: :Code_Viewer(int X, int Y, int W, int H, const char *L) /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Update(fluid/widgets/Code_Viewer.cxx) ⎿  Added 1 line, removed 1 line 30 \param[in] X, Y, W, H position and size of the widget 31 \param[in] L optional label 32 */ 33 -fld::widget::fld::widget::Code_Viewer::Code_Viewer(int X, int Y -, int W, int H, const char *L) 33 +fld::widget::Code_Viewer::Code_Viewer(int X, int Y, int W, int +H, const char *L) 34 : Code_Editor(X, Y, W, H, L) 35 { 36 default_key_function(kf_ignore); ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Text_Viewer.cxx:49:6: error: use of undeclared identifier 'Text_Viewer'; did you mean 'fld::widget::Text_Viewer'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Update(fluid/widgets/Text_Viewer.cxx) ⎿  Added 3 lines, removed 3 lines 28 \param[in] X, Y, W, H position and size of the widget 29 \param[in] L optional label 30 */ 31 -fld::widget::Text_Viewer::Text_Viewer(int X, int Y, int W, int -H, const char *L) 31 +fld::widget::fld::widget::Text_Viewer::Text_Viewer(int X, int Y +, int W, int H, const char *L) 32 : Fl_Text_Display(X, Y, W, H, L) 33 { 34 buffer(new Fl_Text_Buffer); ... 37 /** 38 Avoid memory leaks. 39 */ 40 -fld::widget::Text_Viewer::~Text_Viewer() { 40 +fld::widget::fld::widget::Text_Viewer::~Text_Viewer() { 41 Fl_Text_Buffer *buf = mBuffer; 42 buffer(0); 43 delete buf; ... 46 /** 47 Tricking Fl_Text_Display into using bearable colors for this s pecific task. 48 */ 49 -void Text_Viewer::draw() 49 +void fld::widget::Text_Viewer::draw() 50 { 51 Fl_Color c = Fl::get_color(FL_SELECTION_COLOR); 52 Fl::set_color(FL_SELECTION_COLOR, fl_color_average(FL_BACKGRO UND_COLOR, FL_FOREGROUND_COLOR, 0.9f)); ⏺ Bash(grep -l 'fld::widget::fld::widget' fluid/widgets/*.cxx 2>/dev/null && sed -i '' 's/fld::widget::fld::widget::/fld::widget::/g' fluid/widgets/*.cxx) ⎿ fluid/widgets/Text_Viewer.cxx /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 4 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Formula_Input.cxx:46:6: error: use of undeclared identifi er 'Formula_Input'; did you mean 'fld::widget::Formula_Input'? fluid/widgets/Formula_Input.cxx:50:6: error: use of undeclared identifi … +17 lines (ctrl+o to expand) ⏺ Update(fluid/widgets/Formula_Input.cxx) ⎿  Error editing file ⏺ Read(fluid/widgets/Formula_Input.cxx) ⎿  Read 60 lines ⏺ Update(fluid/widgets/Formula_Input.cxx) ⎿  Added 10 lines, removed 10 lines 36 /** 37 Create an input field. 38 */ 39 -fld::widget::Formula_Input::Formula_Input(int x, int y, int w, -int h, const char *l) 39 +fld::widget::fld::widget::Formula_Input::Formula_Input(int x, i +nt y, int w, int h, const char *l) 40 : Fl_Input(x, y, w, h, l) 41 { 42 Fl_Input::callback((Fl_Callback*)callback_handler_cb); 43 text("0"); 44 } 45 46 -void Formula_Input::callback_handler_cb(Formula_Input *This, vo -id *v) { 46 +void fld::widget::Formula_Input::callback_handler_cb(Formula_In +put *This, void *v) { 47 This->callback_handler(v); 48 } 49 50 -void Formula_Input::callback_handler(void *v) { 50 +void fld::widget::Formula_Input::callback_handler(void *v) { 51 if (user_callback_) 52 (*user_callback_)(this, v); 53 // do *not* update the value to show the evaluated formula he re, because the ... 63 the last character of the variable name when returning. 64 \return the integer value that was found or calculated 65 */ 66 -int Formula_Input::eval_var(uchar *&s) const { 66 +int fld::widget::Formula_Input::eval_var(uchar *&s) const { 67 if (!vars_) 68 return 0; 69 // find the end of the variable name ... 86 \param prio priority of current operation 87 \return the value so far 88 */ 89 -int Formula_Input::eval(uchar *&s, int prio) const { 89 +int fld::widget::Formula_Input::eval(uchar *&s, int prio) const + { 90 int v = 0, sgn = 1; 91 uchar c = *s++; 92 ... 158 \param s formula as a C string 159 \return the calculated value 160 */ 161 -int Formula_Input::eval(const char *s) const 161 +int fld::widget::Formula_Input::eval(const char *s) const 162 { 163 // duplicate the text, so we can modify it 164 uchar *buf = (uchar*)fl_strdup(s); ... 180 /** 181 Evaluate the formula and return the result. 182 */ 183 -int Formula_Input::value() const { 183 +int fld::widget::Formula_Input::value() const { 184 return eval(text()); 185 } 186 187 /** 188 Set the field to an integer value, replacing previous texts. 189 */ 190 -void Formula_Input::value(int v) { 190 +void fld::widget::Formula_Input::value(int v) { 191 char buf[32]; 192 fl_snprintf(buf, sizeof(buf), "%d", v); 193 text(buf); ... 196 /** 197 Allow vertical mouse dragging and mouse wheel to interactivel y change the value. 198 */ 199 -int Formula_Input::handle(int event) { 199 +int fld::widget::Formula_Input::handle(int event) { 200 switch (event) { 201 case FL_MOUSEWHEEL: 202 if (Fl::event_dy()) { ... 212 /** Set the list of the available variables 213 \param vars array of variables, last entry `has name_` set to `0` 214 \param user_data is forwarded to the Variable callback */ 215 -void Formula_Input::variables(Formula_Input_Vars *vars, void * -user_data) { 215 +void fld::widget::Formula_Input::variables(Formula_Input_Vars +*vars, void *user_data) { 216 vars_ = vars; 217 vars_user_data_ = user_data; 218 } ⏺ Bash(sed -i '' 's/fld::widget::fld::widget::/fld::widget::/g' fluid/widgets/*.cxx 2>/dev/null && echo "Done") ⎿ Done /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Node_Browser.cxx:52:11: error: use of undeclared identifi er 'Node_Browser'; did you mean 'fld::widget::Node_Browser'? fluid/widgets/Node_Browser.cxx:53:11: error: use of undeclared identifi … +19 lines (ctrl+o to expand) ⏺ Read(fluid/widgets/Node_Browser.cxx) ⎿  Read 20 lines ⏺ Update(fluid/widgets/Node_Browser.cxx) ⎿  Added 30 lines, removed 30 lines 49 50 // ---- static variables 51 52 -Fl_Color Node_Browser::label_color = 72; 53 -Fl_Font Node_Browser::label_font = FL_HELVETICA; 54 -Fl_Color Node_Browser::class_color = FL_FOREGROUND_COLOR; 55 -Fl_Font Node_Browser::class_font = FL_HELVETICA_BOLD; 56 -Fl_Color Node_Browser::func_color = FL_FOREGROUND_COLOR; 57 -Fl_Font Node_Browser::func_font = FL_HELVETICA; 58 -Fl_Color Node_Browser::name_color = FL_FOREGROUND_COLOR; 59 -Fl_Font Node_Browser::name_font = FL_HELVETICA; 60 -Fl_Color Node_Browser::code_color = FL_FOREGROUND_COLOR; 61 -Fl_Font Node_Browser::code_font = FL_HELVETICA; 62 -Fl_Color Node_Browser::comment_color = FL_DARK_GREEN; 63 -Fl_Font Node_Browser::comment_font = FL_HELVETICA; 52 +Fl_Color fld::widget::Node_Browser::label_color = 72; 53 +Fl_Font fld::widget::Node_Browser::label_font = FL_HELVETI +CA; 54 +Fl_Color fld::widget::Node_Browser::class_color = FL_FOREGRO +UND_COLOR; 55 +Fl_Font fld::widget::Node_Browser::class_font = FL_HELVETI +CA_BOLD; 56 +Fl_Color fld::widget::Node_Browser::func_color = FL_FOREGRO +UND_COLOR; 57 +Fl_Font fld::widget::Node_Browser::func_font = FL_HELVETI +CA; 58 +Fl_Color fld::widget::Node_Browser::name_color = FL_FOREGRO +UND_COLOR; 59 +Fl_Font fld::widget::Node_Browser::name_font = FL_HELVETI +CA; 60 +Fl_Color fld::widget::Node_Browser::code_color = FL_FOREGRO +UND_COLOR; 61 +Fl_Font fld::widget::Node_Browser::code_font = FL_HELVETI +CA; 62 +Fl_Color fld::widget::Node_Browser::comment_color = FL_DARK_GR +EEN; 63 +Fl_Font fld::widget::Node_Browser::comment_font = FL_HELVETI +CA; 64 65 // ---- global functions 66 ... 213 \todo It would be nice to be able to grab one or more nodes a nd move them 214 within the hierarchy. 215 */ 216 -fld::widget::Node_Browser::Node_Browser(int X,int Y,int W,int -H,const char*l) : 216 +fld::widget::fld::widget::Node_Browser::Node_Browser(int X,int + Y,int W,int H,const char*l) : 217 Fl_Browser_(X,Y,W,H,l) 218 { 219 type(FL_MULTI_BROWSER); ... 225 Override the method to find the first item in the list of ele ments. 226 \return the first item 227 */ 228 -void *Node_Browser::item_first() const { 228 +void *fld::widget::Node_Browser::item_first() const { 229 return Fluid.proj.tree.first; 230 } 231 ... 234 \param l this item 235 \return the next item, irregardless of tree depth, or 0 at th e end 236 */ 237 -void *Node_Browser::item_next(void *l) const { 237 +void *fld::widget::Node_Browser::item_next(void *l) const { 238 return ((Node*)l)->next; 239 } 240 ... 243 \param l this item 244 \return the previous item, irregardless of tree depth, or 0 a t the start 245 */ 246 -void *Node_Browser::item_prev(void *l) const { 246 +void *fld::widget::Node_Browser::item_prev(void *l) const { 247 return ((Node*)l)->prev; 248 } 249 ... 253 \return 1 if selected, 0 if not 254 \todo what is the difference between selected and new_selecte d, and why do we do this? 255 */ 256 -int Node_Browser::item_selected(void *l) const { 256 +int fld::widget::Node_Browser::item_selected(void *l) const { 257 return ((Node*)l)->new_selected; 258 } 259 ... 262 \param l this item 263 \param[in] v 1 if selecting, 0 if not 264 */ 265 -void Node_Browser::item_select(void *l,int v) { 265 +void fld::widget::Node_Browser::item_select(void *l,int v) { 266 ((Node*)l)->new_selected = v; 267 } 268 ... 271 \param l this item 272 \return height in FLTK units (used to be pixels before high r es screens) 273 */ 274 -int Node_Browser::item_height(void *l) const { 274 +int fld::widget::Node_Browser::item_height(void *l) const { 275 Node *t = (Node*)l; 276 if (t->visible) { 277 if (Fluid.show_comments && t->comment()) ... 286 Override the method to return the estimated height of all ite ms. 287 \return height in FLTK units 288 */ 289 -int Node_Browser::incr_height() const { 289 +int fld::widget::Node_Browser::incr_height() const { 290 return textsize() + 5 + linespacing(); 291 } 292 ... 311 \param X,Y these give the position in window coordinates o f the top left 312 corner of this line 313 */ 314 -void Node_Browser::item_draw(void *v, int X, int Y, int, int) -const { 314 +void fld::widget::Node_Browser::item_draw(void *v, int X, int +Y, int, int) const { 315 // cast to a more general type 316 Node *l = (Node *)v; 317 ... 455 \param v this item 456 \return width in FLTK units 457 */ 458 -int Node_Browser::item_width(void *v) const { 458 +int fld::widget::Node_Browser::item_width(void *v) const { 459 460 char buf[500]; // edit buffer: large enough to hold 80 UTF-8 chars + nul 461 ... 490 /** 491 Callback to tell the Fluid UI when the list of selected items changed. 492 */ 493 -void Node_Browser::callback() { 493 +void fld::widget::Node_Browser::callback() { 494 selection_changed((Node*)selection()); 495 } 496 ... 508 \param[in] e the incoming event type 509 \return 0 if the event is not supported, and 1 if the event w as "used up" 510 */ 511 -int Node_Browser::handle(int e) { 511 +int fld::widget::Node_Browser::handle(int e) { 512 static Node *title; 513 Node *l; 514 int X,Y,W,H; bbox(X,Y,W,H); ... 576 /** 577 Save the current scrollbar position during rebuild. 578 */ 579 -void Node_Browser::save_scroll_position() { 579 +void fld::widget::Node_Browser::save_scroll_position() { 580 saved_h_scroll_ = hposition(); 581 saved_v_scroll_ = vposition(); 582 } ... 584 /** 585 Restore the previous scrollbar position after rebuild. 586 */ 587 -void Node_Browser::restore_scroll_position() { 587 +void fld::widget::Node_Browser::restore_scroll_position() { 588 hposition(saved_h_scroll_); 589 vposition(saved_v_scroll_); 590 } ... 594 This clears internal caches, recalculates the scroll bar size s, and 595 sends a redraw() request to the widget. 596 */ 597 -void Node_Browser::rebuild() { 597 +void fld::widget::Node_Browser::rebuild() { 598 save_scroll_position(); 599 new_list(); 600 damage(FL_DAMAGE_SCROLL); ... 606 Rebuild the browser layout and make sure that the given item is visible. 607 \param[in] inNode pointer to a widget node derived from Node. 608 */ 609 -void Node_Browser::display(Node *inNode) { 609 +void fld::widget::Node_Browser::display(Node *inNode) { 610 if (!inNode) { 611 // Alternative: find the first (last?) visible selected it em. 612 return; ... 640 vposition(newV); 641 } 642 643 -void Node_Browser::load_prefs() { 643 +void fld::widget::Node_Browser::load_prefs() { 644 int c; 645 Fl_Preferences p(Fluid.preferences, "widget_browser"); 646 p.get("label_color", c, 72); label_color = c; ... 657 p.get("comment_font", c, FL_HELVETICA); comment_font = c; 658 } 659 660 -void Node_Browser::save_prefs() { 660 +void fld::widget::Node_Browser::save_prefs() { 661 Fl_Preferences p(Fluid.preferences, "widget_browser"); 662 p.set("label_color", (int)label_color); 663 p.set("label_font", (int)label_font); ⏺ Bash(sed -i '' 's/fld::widget::fld::widget::/fld::widget::/g' fluid/widgets/*.cxx 2>/dev/null && make 2>&1 | grep -E "error:" | head -10) ⎿ fluid/widgets/Node_Browser.cxx:78:32: error: unknown type name 'Node_Br owser'; did you mean 'fld::widget::Node_Browser'? /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 10 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Read(fluid/widgets/Node_Browser.cxx) ⎿  Read 10 lines ⏺ Update(fluid/widgets/Node_Browser.cxx) ⎿  Added 1 line, removed 1 line 75 Shortcut to create the widget browser. 76 */ 77 Fl_Widget *make_widget_browser(int x,int y,int w,int h) { 78 - return (widget_browser = new Node_Browser(x,y,w,h)); 78 + return (widget_browser = new fld::widget::Node_Browser(x,y,w, +h)); 79 } 80 81 /** ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⎿  Found 1 new diagnostic issue in 1 file (ctrl+o to expand) ⏺ Сборка успешна. Проверю оставшиеся файлы с using namespace. ⏺ Bash(grep -rn '^using namespace' fluid/ --include="*.cxx" 2>/dev/null) ⎿  fluid//tools/ExternalCodeEditor_WIN32.cxx:31:using namespace fld; fluid//app/Snap_Action.cxx:42:using namespace fld; fluid//app/Snap_Action.cxx:43:using namespace fld::app; … +9 lines (ctrl+o to expand) ⏺ Осталось 5 файлов. Обработаю nodes файлы (WIN32 файл не компилируется). ⏺ Bash(sed -i '' '/^using namespace fld;/d' fluid/nodes/Function_Node.cxx fluid/nodes/Menu_Node.cxx fluid/nodes/Widget_Node.cxx sed -i '' '/^using namespace fld::io;/d…) ⎿ Done /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(make 2>&1 | grep -E "error:" | head -25) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Сборка успешна. Проверю оставшиеся файлы. ⏺ Bash(grep -rn '^using namespace' fluid/ --include="*.cxx" 2>/dev/null) ⎿  fluid//tools/ExternalCodeEditor_WIN32.cxx:31:using namespace fld; fluid//app/Snap_Action.cxx:42:using namespace fld; fluid//app/Snap_Action.cxx:43:using namespace fld::app; … +2 lines (ctrl+o to expand) ⏺ Остался только Snap_Action.cxx. Попробую удалить using namespace. ⏺ Bash(sed -i '' '/^using namespace fld;/d' fluid/app/Snap_Action.cxx sed -i '' '/^using namespace fld::app;/d' fluid/app/Snap_Action.cxx…) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Отлично! Сборка успешна. ⏺ Bash(grep -rn '^using namespace' fluid/ --include="*.cxx" --include="*.h" --include="*.H" 2>/dev/null | grep -v WIN32) ⎿ fluid//app/Snap_Action.cxx:42:using namespace fld::app; /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Остался один using namespace. Удалю его. ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 15 lines ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Removed 2 lines 39 #endif 40 41 42 -using namespace fld::app; 43 - 42 // TODO: warning if the user wants to change builtin layouts 43 // TODO: move panel to global settings panel (move load & save to main pulldown, or to toolbox?) 44 // INFO: how about a small tool box for quick preset selection and disabling of individual snaps? ⏺ Bash(make 2>&1 | grep -E "error:" | head -30) ⎿ fluid/app/Snap_Action.cxx:48:5: error: use of undeclared identifier 'Sn ap_Action'; did you mean 'fld::app::Snap_Action'? fluid/app/Snap_Action.cxx:49:5: error: use of undeclared identifier 'Sn … +38 lines (ctrl+o to expand) ⎿  Found 9 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Много ошибок. Добавлю квалификаторы. ⏺ Bash(sed -i '' 's/\bSnap_Action::/fld::app::Snap_Action::/g' fluid/app/Snap_Action.cxx sed -i '' 's/\bLayout_Preset::/fld::app::Layout_Preset::/g' fluid/app/Snap_Act…) ⎿ Done /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(make 2>&1 | grep -E "error:" | head -20) ⎿ fluid/app/Snap_Action.cxx:48:5: error: use of undeclared identifier 'Sn ap_Action'; did you mean 'fld::app::Snap_Action'? fluid/app/Snap_Action.cxx:49:5: error: use of undeclared identifier 'Sn … +38 lines (ctrl+o to expand) ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 20 lines ⏺ Bash(grep -n 'Snap_Action' fluid/app/Snap_Action.cxx | head -10) ⎿  17:#include "app/Snap_Action.h" 48:int Snap_Action::eex = 0; 49:int Snap_Action::eey = 0; … +11 lines (ctrl+o to expand) ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 14 lines, removed 14 lines 45 46 void select_layout_suite_cb(Fl_Widget *, void *user_data); 47 48 -int Snap_Action::eex = 0; 49 -int Snap_Action::eey = 0; 48 +int fld::app::Snap_Action::eex = 0; 49 +int fld::app::Snap_Action::eey = 0; 50 51 static Layout_Preset fltk_app = { 52 15, 15, 15, 15, 0, 0, // window: l, r, t, b, gx, gy ... 1002 \return -1 if this point is closer than any previous check, and this is the 1003 new distance to beat. 1004 */ 1005 -int Snap_Action::check_x_(Snap_Data &d, int x_ref, int x_snap -) { 1005 +int fld::app::Snap_Action::check_x_(Snap_Data &d, int x_ref, +int x_snap) { 1006 int dd = x_ref + d.dx - x_snap; 1007 int d2 = abs(dd); 1008 if (d2 > d.x_dist) return 1; ... 1015 1016 /** 1017 \brief Check if a snap action has reached a preferred y posi tion. 1018 - \see Snap_Action::check_x_(Snap_Data &d, int x_ref, int x_sn -ap) 1018 + \see fld::app::Snap_Action::check_x_(Snap_Data &d, int x_ref +, int x_snap) 1019 */ 1020 -int Snap_Action::check_y_(Snap_Data &d, int y_ref, int y_snap -) { 1020 +int fld::app::Snap_Action::check_y_(Snap_Data &d, int y_ref, +int y_snap) { 1021 int dd = y_ref + d.dy - y_snap; 1022 int d2 = abs(dd); 1023 if (d2 > d.y_dist) return 1; ... 1030 1031 /** 1032 \brief Check if a snap action has reached a preferred x and y position. 1033 - \see Snap_Action::check_x_(Snap_Data &d, int x_ref, int x_sn -ap) 1033 + \see fld::app::Snap_Action::check_x_(Snap_Data &d, int x_ref +, int x_snap) 1034 */ 1035 -void Snap_Action::check_x_y_(Snap_Data &d, int x_ref, int x_s -nap, int y_ref, int y_snap) { 1035 +void fld::app::Snap_Action::check_x_y_(Snap_Data &d, int x_re +f, int x_snap, int y_ref, int y_snap) { 1036 int ddx = x_ref + d.dx - x_snap; 1037 int d2x = abs(ddx); 1038 int ddy = y_ref + d.dy - y_snap; ... 1053 should be drawn. 1054 \param[inout] d current event data 1055 */ 1056 -bool Snap_Action::matches(Snap_Data &d) { 1056 +bool fld::app::Snap_Action::matches(Snap_Data &d) { 1057 switch (type) { 1058 case 1: return (d.drag & mask) && (eex == ex) && (d.dx == dx); 1059 case 2: return (d.drag & mask) && (eey == ey) && (d.dy == dy); ... 1066 \brief Run through all possible snap actions and store the w inning coordinates in eex and eey. 1067 \param[inout] d current event data 1068 */ 1069 -void Snap_Action::check_all(Snap_Data &data) { 1069 +void fld::app::Snap_Action::check_all(Snap_Data &data) { 1070 int i; 1071 for (i =0; list[i]; i++) { 1072 if (list[i]->mask & data.drag) ... 1083 coordinate, all of them will be drawn. 1084 \param[inout] d current event data 1085 */ 1086 -void Snap_Action::draw_all(Snap_Data &data) { 1086 +void fld::app::Snap_Action::draw_all(Snap_Data &data) { 1087 int i; 1088 for (i =0; list[i]; i++) { 1089 if (list[i]->matches(data)) ... 1092 } 1093 1094 /** Return a sensible step size for resizing a widget. */ 1095 -void Snap_Action::get_resize_stepsize(int &x_step, int &y_ste -p) { 1095 +void fld::app::Snap_Action::get_resize_stepsize(int &x_step, +int &y_step) { 1096 Layout_Preset *layout = Fluid.proj.layout; 1097 if ((layout->widget_inc_w > 1) && (layout->widget_inc_h > 1 )) { 1098 x_step = layout->widget_inc_w; ... 1107 } 1108 1109 /** Return a sensible step size for moving a widget. */ 1110 -void Snap_Action::get_move_stepsize(int &x_step, int &y_step) - { 1110 +void fld::app::Snap_Action::get_move_stepsize(int &x_step, in +t &y_step) { 1111 Layout_Preset *layout = Fluid.proj.layout; 1112 if ((layout->group_grid_x > 1) && (layout->group_grid_y > 1 )) { 1113 x_step = layout->group_grid_x; ... 1122 } 1123 1124 /** Fix the given size to the same or next bigger snap positi on. */ 1125 -void Snap_Action::better_size(int &w, int &h) { 1125 +void fld::app::Snap_Action::better_size(int &w, int &h) { 1126 Layout_Preset *layout = Fluid.proj.layout; 1127 int x_min = 1, y_min = 1, x_inc = 1, y_inc = 1; 1128 get_resize_stepsize(x_inc, y_inc); ... 1686 action in the list wins. All snap actions with the same dist ance and same 1687 winning coordinates are drawn in the overlay plane. 1688 */ 1689 -Snap_Action *Snap_Action::list[] = { 1689 +Snap_Action *fld::app::Snap_Action::list[] = { 1690 &snap_left_window_edge, 1691 &snap_right_window_edge, 1692 &snap_top_window_edge, ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 5 lines, removed 5 lines 159 /** 160 Write presets to a Preferences database. 161 */ 162 -void Layout_Preset::write(Fl_Preferences &prefs) { 162 +void fld::app::Layout_Preset::write(Fl_Preferences &prefs) { 163 assert(this); 164 Fl_Preferences p_win(prefs, "Window"); 165 p_win.set("left_margin", left_window_margin); ... 199 /** 200 Read presets from a Preferences database. 201 */ 202 -void Layout_Preset::read(Fl_Preferences &prefs) { 202 +void fld::app::Layout_Preset::read(Fl_Preferences &prefs) { 203 assert(this); 204 Fl_Preferences p_win(prefs, "Window"); 205 p_win.get("left_margin", left_window_margin, 15); ... 239 /** 240 Write presets to an .fl project file. 241 */ 242 -void Layout_Preset::write(fld::io::Project_Writer *out) { 242 +void fld::app::Layout_Preset::write(fld::io::Project_Writer *o +ut) { 243 out->write_string(" preset { 1\n"); // preset format vers ion 244 out->write_string(" %d %d %d %d %d %d\n", 245 left_window_margin, right_window_margin, ... 261 /** 262 Read presets from an .fl project file. 263 */ 264 -void Layout_Preset::read(fld::io::Project_Reader *in) { 264 +void fld::app::Layout_Preset::read(fld::io::Project_Reader *in +) { 265 const char *key; 266 key = in->read_word(1); 267 if (key && !strcmp(key, "{")) { ... 317 /** 318 Return the preferred text size, but make sure it's not 0. 319 */ 320 -int Layout_Preset::textsize_not_null() { 320 +int fld::app::Layout_Preset::textsize_not_null() { 321 // try the user selected text size 322 if (textsize > 0) return textsize; 323 // if the user did not set one, try the label size ⎿  Found 2 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Bash(sed -i '' 's/static Layout_Preset /static fld::app::Layout_Preset /g' fluid/app/Snap_Action.cxx sed -i '' 's/static Layout_Suite /static fld::app::Layout_Suite…) ⎿ Done /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(make 2>&1 | grep -E "error:" | head -20) ⎿ fluid/app/Snap_Action.cxx:103:1: error: unknown type name 'Layout_Prese t'; did you mean 'fld::app::Layout_Preset'? fluid/app/Snap_Action.cxx:335:6: error: use of undeclared identifier 'L … +38 lines (ctrl+o to expand) ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 23 lines, removed 23 lines 48 int fld::app::Snap_Action::eex = 0; 49 int fld::app::Snap_Action::eey = 0; 50 51 -static fld::app::Layout_Preset fltk_app = { 51 +static fld::app::fld::app::Layout_Preset fltk_app = { 52 15, 15, 15, 15, 0, 0, // window: l, r, t, b, gx, gy 53 10, 10, 10, 10, 0, 0, // group: l, r, t, b, gx, gy 54 25, 25, // tabs: t, b ... 56 20, 4, 8, // widget_y: min, inc, gap 57 0, 14, -1, 14 // labelfont/size, textfont/size 58 }; 59 -static fld::app::Layout_Preset fltk_dlg = { 59 +static fld::app::fld::app::Layout_Preset fltk_dlg = { 60 10, 10, 10, 10, 0, 0, // window: l, r, t, b, gx, gy 61 10, 10, 10, 10, 0, 0, // group: l, r, t, b, gx, gy 62 20, 20, // tabs: t, b ... 64 20, 5, 5, // widget_y: min, inc, gap 65 0, 11, -1, 11 // labelfont/size, textfont/size 66 }; 67 -static fld::app::Layout_Preset fltk_tool = { 67 +static fld::app::fld::app::Layout_Preset fltk_tool = { 68 10, 10, 10, 10, 0, 0, // window: l, r, t, b, gx, gy 69 10, 10, 10, 10, 0, 0, // group: l, r, t, b, gx, gy 70 18, 18, // tabs: t, b ... 73 0, 10, -1, 10 // labelfont/size, textfont/size 74 }; 75 76 -static fld::app::Layout_Preset grid_app = { 76 +static fld::app::fld::app::Layout_Preset grid_app = { 77 12, 12, 12, 12, 12, 12, // window: l, r, t, b, gx, gy 78 12, 12, 12, 12, 12, 12, // group: l, r, t, b, gx, gy 79 24, 24, // tabs: t, b ... 82 0, 14, -1, 14 // labelfont/size, textfont/size 83 }; 84 85 -static fld::app::Layout_Preset grid_dlg = { 85 +static fld::app::fld::app::Layout_Preset grid_dlg = { 86 10, 10, 10, 10, 10, 10, // window: l, r, t, b, gx, gy 87 10, 10, 10, 10, 10, 10, // group: l, r, t, b, gx, gy 88 20, 20, // tabs: t, b ... 91 0, 12, -1, 12 // labelfont/size, textfont/size 92 }; 93 94 -static fld::app::Layout_Preset grid_tool = { 94 +static fld::app::fld::app::Layout_Preset grid_tool = { 95 8, 8, 8, 8, 8, 8, // window: l, r, t, b, gx, gy 96 8, 8, 8, 8, 8, 8, // group: l, r, t, b, gx, gy 97 16, 16, // tabs: t, b ... 100 0, 10, -1, 10 // labelfont/size, textfont/size 101 }; 102 103 -Layout_Preset *fld::app::default_layout_preset = &fltk_app; 103 +fld::app::Layout_Preset *fld::app::default_layout_preset = &fl +tk_app; 104 105 static fld::app::Layout_Suite static_suite_list[] = { 106 { (char*)"FLTK", (char*)"@fd_beaker FLTK", { &fltk_app, &flt k_dlg, &fltk_tool }, FLD_TOOL_STORE_INTERNAL }, ... 159 /** 160 Write presets to a Preferences database. 161 */ 162 -void fld::app::Layout_Preset::write(Fl_Preferences &prefs) { 162 +void fld::app::fld::app::Layout_Preset::write(Fl_Preferences & +prefs) { 163 assert(this); 164 Fl_Preferences p_win(prefs, "Window"); 165 p_win.set("left_margin", left_window_margin); ... 199 /** 200 Read presets from a Preferences database. 201 */ 202 -void fld::app::Layout_Preset::read(Fl_Preferences &prefs) { 202 +void fld::app::fld::app::Layout_Preset::read(Fl_Preferences &p +refs) { 203 assert(this); 204 Fl_Preferences p_win(prefs, "Window"); 205 p_win.get("left_margin", left_window_margin, 15); ... 239 /** 240 Write presets to an .fl project file. 241 */ 242 -void fld::app::Layout_Preset::write(fld::io::Project_Writer *o -ut) { 242 +void fld::app::fld::app::Layout_Preset::write(fld::io::Project +_Writer *out) { 243 out->write_string(" preset { 1\n"); // preset format vers ion 244 out->write_string(" %d %d %d %d %d %d\n", 245 left_window_margin, right_window_margin, ... 261 /** 262 Read presets from an .fl project file. 263 */ 264 -void fld::app::Layout_Preset::read(fld::io::Project_Reader *in -) { 264 +void fld::app::fld::app::Layout_Preset::read(fld::io::Project_ +Reader *in) { 265 const char *key; 266 key = in->read_word(1); 267 if (key && !strcmp(key, "{")) { ... 317 /** 318 Return the preferred text size, but make sure it's not 0. 319 */ 320 -int fld::app::Layout_Preset::textsize_not_null() { 320 +int fld::app::fld::app::Layout_Preset::textsize_not_null() { 321 // try the user selected text size 322 if (textsize > 0) return textsize; 323 // if the user did not set one, try the label size ... 883 new_suite.name(name); 884 int i; 885 for (i =0; i<3; ++i) { 886 - new_suite.layout[i] = new Layout_Preset; 887 - ::memcpy(new_suite.layout[i], old_suite.layout[i], sizeof( -Layout_Preset)); 886 + new_suite.layout[i] = new fld::app::Layout_Preset; 887 + ::memcpy(new_suite.layout[i], old_suite.layout[i], sizeof( +fld::app::Layout_Preset)); 888 } 889 fld::Tool_Store new_storage = old_suite.storage_; 890 if (new_storage == FLD_TOOL_STORE_INTERNAL) ... 1093 1094 /** Return a sensible step size for resizing a widget. */ 1095 void fld::app::Snap_Action::get_resize_stepsize(int &x_step, int &y_step) { 1096 - Layout_Preset *layout = Fluid.proj.layout; 1096 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1097 if ((layout->widget_inc_w > 1) && (layout->widget_inc_h > 1 )) { 1098 x_step = layout->widget_inc_w; 1099 y_step = layout->widget_inc_h; ... 1108 1109 /** Return a sensible step size for moving a widget. */ 1110 void fld::app::Snap_Action::get_move_stepsize(int &x_step, in t &y_step) { 1111 - Layout_Preset *layout = Fluid.proj.layout; 1111 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1112 if ((layout->group_grid_x > 1) && (layout->group_grid_y > 1 )) { 1113 x_step = layout->group_grid_x; 1114 y_step = layout->group_grid_y; ... 1123 1124 /** Fix the given size to the same or next bigger snap positi on. */ 1125 void fld::app::Snap_Action::better_size(int &w, int &h) { 1126 - Layout_Preset *layout = Fluid.proj.layout; 1126 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1127 int x_min = 1, y_min = 1, x_inc = 1, y_inc = 1; 1128 get_resize_stepsize(x_inc, y_inc); 1129 if (x_inc < 1) x_inc = 1; ... 1438 class Fd_Snap_Window_Grid : public Fd_Snap_Grid { 1439 public: 1440 void check(Snap_Data &d) { 1441 - Layout_Preset *layout = Fluid.proj.layout; 1441 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1442 clr(); 1443 if (in_window(d)) check_grid(d, layout->left_window_margi n, layout->window_grid_x, d.win->o->w()-layout->right_window_ margin, 1444 layout->top_window_margin, l ayout->window_grid_y, d.win->o->h()-layout->bottom_window_mar gin); 1445 } 1446 void draw(Snap_Data &d) { 1447 - Layout_Preset *layout = Fluid.proj.layout; 1447 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1448 draw_grid(nearest_x, nearest_y, layout->window_grid_x, la yout->window_grid_y); 1449 } 1450 }; ... 1457 public: 1458 void check(Snap_Data &d) { 1459 if (in_group(d)) { 1460 - Layout_Preset *layout = Fluid.proj.layout; 1460 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1461 clr(); 1462 Fl_Widget *g = parent(d); 1463 check_grid(d, g->x()+layout->left_group_margin, layout- >group_grid_x, g->x()+g->w()-layout->right_group_margin, ... 1465 } 1466 } 1467 void draw(Snap_Data &d) { 1468 - Layout_Preset *layout = Fluid.proj.layout; 1468 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1469 draw_grid(nearest_x, nearest_y, layout->group_grid_x, lay out->group_grid_y); 1470 } 1471 }; ... 1627 public: 1628 Fd_Snap_Widget_Ideal_Width() { type = 1; mask = FD_LEFT|FD_ RIGHT; } 1629 void check(Snap_Data &d) { 1630 - Layout_Preset *layout = Fluid.proj.layout; 1630 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1631 clr(); 1632 if (!d.wgt) return; 1633 int iw = 15, ih = 15; ... 1654 public: 1655 Fd_Snap_Widget_Ideal_Height() { type = 2; mask = FD_TOP|FD_ BOTTOM; } 1656 void check(Snap_Data &d) { 1657 - Layout_Preset *layout = Fluid.proj.layout; 1657 + fld::app::Layout_Preset *layout = Fluid.proj.layout; 1658 clr(); 1659 if (!d.wgt) return; 1660 int iw, ih; ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 19 lines, removed 19 lines 102 103 fld::app::Layout_Preset *fld::app::default_layout_preset = &fl tk_app; 104 105 -static fld::app::Layout_Suite static_suite_list[] = { 105 +static fld::app::fld::app::Layout_Suite static_suite_list[] = +{ 106 { (char*)"FLTK", (char*)"@fd_beaker FLTK", { &fltk_app, &flt k_dlg, &fltk_tool }, FLD_TOOL_STORE_INTERNAL }, 107 { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &gri d_dlg, &grid_tool }, FLD_TOOL_STORE_INTERNAL } 108 }; ... 154 } 155 } 156 157 -// ---- Layout_Suite ----------------------------------------- -------- MARK: - 157 +// ---- fld::app::Layout_Suite ------------------------------- +----------------- MARK: - 158 159 /** 160 Write presets to a Preferences database. ... 327 } 328 329 330 -// ---- Layout_Suite ----------------------------------------- -------- MARK: - 330 +// ---- fld::app::Layout_Suite ------------------------------- +----------------- MARK: - 331 332 /** 333 Write a presets suite to a Preferences database. 334 */ 335 -void Layout_Suite::write(Fl_Preferences &prefs) { 335 +void fld::app::Layout_Suite::write(Fl_Preferences &prefs) { 336 assert(this); 337 assert(name_); 338 prefs.set("name", name_); ... 347 /** 348 Read a presets suite from a Preferences database. 349 */ 350 -void Layout_Suite::read(Fl_Preferences &prefs) { 350 +void fld::app::Layout_Suite::read(Fl_Preferences &prefs) { 351 assert(this); 352 int i; 353 for (i = 0; i < 3; ++i) { ... 360 /** 361 Write a presets suite to an .fl project file. 362 */ 363 -void Layout_Suite::write(fld::io::Project_Writer *out) { 363 +void fld::app::Layout_Suite::write(fld::io::Project_Writer *ou +t) { 364 out->write_string(" suite {\n"); 365 out->write_string(" name "); out->write_word(name_); out- >write_string("\n"); 366 int i; ... 373 /** 374 Read a presets suite from an .fl project file. 375 */ 376 -void Layout_Suite::read(fld::io::Project_Reader *in) { 376 +void fld::app::Layout_Suite::read(fld::io::Project_Reader *in) + { 377 const char *key; 378 key = in->read_word(1); 379 if (key && !strcmp(key, "{")) { ... 401 \brief Update the menu_label to show a symbol representing th e storage location. 402 Also updates the FLUID user interface. 403 */ 404 -void Layout_Suite::update_label() { 404 +void fld::app::Layout_Suite::update_label() { 405 const char *sym = ""; 406 switch (storage_) { 407 case FLD_TOOL_STORE_INTERNAL: sym = "@fd_beaker "; break; ... 421 \brief Update the Suite name and the Suite menu_label. 422 Also updates the FLUID user interface. 423 */ 424 -void Layout_Suite::name(const char *n) { 424 +void fld::app::Layout_Suite::name(const char *n) { 425 if (name_) 426 ::free(name_); 427 if (n) ... 434 /** 435 Initialize the class for first use. 436 */ 437 -void Layout_Suite::init() { 437 +void fld::app::Layout_Suite::init() { 438 name_ = 0; 439 menu_label = 0; 440 layout[0] = layout[1] = layout[2] = 0; ... 444 /** 445 Free all allocated resources. 446 */ 447 -Layout_Suite::~Layout_Suite() { 447 +fld::app::Layout_Suite::~fld::app::Layout_Suite() { 448 if (storage_ == FLD_TOOL_STORE_INTERNAL) return; 449 if (name_) ::free(name_); 450 int i; ... 622 ::free(choice_menu_); 623 int i; 624 for (i = 0; i < list_size_; i++) { 625 - Layout_Suite &suite = list_[i]; 625 + fld::app::Layout_Suite &suite = list_[i]; 626 if (suite.storage_ != FLD_TOOL_STORE_INTERNAL) 627 - suite.~Layout_Suite(); 627 + suite.~fld::app::Layout_Suite(); 628 } 629 ::free(list_); 630 } ... 697 int n = 0; 698 int i; 699 for (i = 0; i < list_size_; ++i) { 700 - Layout_Suite &suite = list_[i]; 700 + fld::app::Layout_Suite &suite = list_[i]; 701 if (suite.storage_ == storage) { 702 Fl_Preferences prefs_suite(prefs_list, Fl_Preferences::N ame(n++)); 703 suite.write(prefs_suite); ... 751 out->write_string(" current_suite "); out->write_word(list_ [current_suite()].name_); out->write_string("\n"); 752 out->write_string(" current_preset %d\n", current_preset()) ; 753 for (i =0; ifind_item (select_layout_preset_cb); ... 657 /** 658 Refresh the label pointers for both pulldown menus. 659 */ 660 -void Layout_List::update_menu_labels() { 660 +void fld::app::Layout_List::update_menu_labels() { 661 int i; 662 for (i =0; iread_word(1); 767 if (key && !strcmp(key, "{")) { ... 798 Set the current Suite. 799 \param[in] ix index into list of suites 800 */ 801 -void Layout_List::current_suite(int ix) { 801 +void fld::app::Layout_List::current_suite(int ix) { 802 assert(ix >= 0); 803 assert(ix < list_size_); 804 current_suite_ = ix; ... 810 \param[in] arg_name name of the selected suite 811 \return if no name is given or the name is not found, keep th e current suite selected 812 */ 813 -void Layout_List::current_suite(const char *arg_name) { 813 +void fld::app::Layout_List::current_suite(const char *arg_name +) { 814 if (!arg_name || !arg_name[0]) return; 815 int i; 816 for (i = 0; i < list_size_; ++i) { ... 826 Select a Preset within the current Suite. 827 \param[in] ix 0 = application, 1 = dialog, 2 = toolbox 828 */ 829 -void Layout_List::current_preset(int ix) { 829 +void fld::app::Layout_List::current_preset(int ix) { 830 assert(ix >= 0); 831 assert(ix < 3); 832 current_preset_ = ix; ... 836 /** 837 Allocate enough space for n entries in the list. 838 */ 839 -void Layout_List::capacity(int n) { 839 +void fld::app::Layout_List::capacity(int n) { 840 static Fl_Menu_Item *suite_menu = 0; 841 if (!suite_menu) 842 suite_menu = (Fl_Menu_Item*)Fluid.main_menubar->find_item( layout_suite_marker); ... 872 \brief Clone the currently selected suite and append it to th e list. 873 Selects the new layout and updates the UI. 874 */ 875 -int Layout_List::add(const char *name) { 875 +int fld::app::Layout_List::add(const char *name) { 876 if (list_size_ == list_capacity_) { 877 capacity(list_capacity_ * 2); 878 } ... 903 /** 904 Rename the current Suite. 905 */ 906 -void Layout_List::rename(const char *name) { 906 +void fld::app::Layout_List::rename(const char *name) { 907 int n = current_suite(); 908 list_[n].name(name); 909 main_menu_[n].label(list_[n].menu_label); ... 914 Remove the given suite. 915 \param[in] ix index into list of suites 916 */ 917 -void Layout_List::remove(int ix) { 917 +void fld::app::Layout_List::remove(int ix) { 918 int tail = list_size_-ix-1; 919 if (tail) { 920 int i; ... 932 Remove all Suites that use the given storage attribute. 933 \param[in] storage storage attribute, see FLD_TOOL_STORE_INTE RNAL, etc. 934 */ 935 -void Layout_List::remove_all(fld::Tool_Store storage) { 935 +void fld::app::Layout_List::remove_all(fld::Tool_Store storage +) { 936 int i; 937 for (i =list_size_-1; i>=0; --i) { 938 if (list_[i].storage_ == storage) ⏺ Bash(sed -i '' 's/fld::app::fld::app::/fld::app::/g' fluid/app/Snap_Action.cxx make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Сборка успешна. Проверю оставшиеся using namespace. ⏺ Bash(grep -rn '^using namespace' fluid/ --include="*.cxx" --include="*.h" --include="*.H" 2>/dev/null | grep -v WIN32) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Все using namespace удалены из FLUID. Финальная проверка сборки. ⏺ Bash(make 2>&1 | grep -E "error:|warning:" | head -20) ⎿ fluid/app/Snap_Action.cxx:447:25: error: '~' in destructor name should be after nested name specifier fluid/app/Snap_Action.cxx:599:1: error: no member named 'fld' in 'fld:: … +33 lines (ctrl+o to expand) ⏺ Нужно исправить дополнительные ошибки в Snap_Action.cxx. ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 15 lines ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 1 line, removed 1 line 444 /** 445 Free all allocated resources. 446 */ 447 -fld::app::Layout_Suite::~fld::app::Layout_Suite() { 447 +fld::app::Layout_Suite::~Layout_Suite() { 448 if (storage_ == FLD_TOOL_STORE_INTERNAL) return; 449 if (name_) ::free(name_); 450 int i; ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 30 lines ⎿  Found 7 new diagnostic issues in 1 file (ctrl+o to expand) ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 1 line, removed 1 line 596 /** 597 Instantiate the class that holds a list of all layouts and ma nages the UI. 598 */ 599 -fld::app::Layout_List::fld::app::Layout_List() 599 +fld::app::Layout_List::Layout_List() 600 : main_menu_(main_layout_submenu_), 601 choice_menu_(static_choice_menu), 602 list_(static_suite_list), ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 1 line, removed 1 line 615 /** 616 Release allocated resources. 617 */ 618 -fld::app::Layout_List::~fld::app::Layout_List() { 618 +fld::app::Layout_List::~Layout_List() { 619 assert(this); 620 if (!list_is_static_) { 621 ::free(main_menu_); ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 74 lines, removed 74 lines 959 return grid_x; 960 } 961 962 -static bool in_window(Snap_Data &d) { 962 +static bool in_window(fld::app::Snap_Data &d) { 963 return (d.wgt && d.wgt->parent == d.win); 964 } 965 966 -static bool in_group(Snap_Data &d) { 966 +static bool in_group(fld::app::Snap_Data &d) { 967 return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(FLD_NO DE_TYPE_Group) && d.wgt->parent != d.win); 968 } 969 970 -static bool in_tabs(Snap_Data &d) { 970 +static bool in_tabs(fld::app::Snap_Data &d) { 971 return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(FLD_NO DE_TYPE_Tabs)); 972 } 973 974 -static Fl_Group *parent(Snap_Data &d) { 974 +static Fl_Group *parent(fld::app::Snap_Data &d) { 975 return (d.wgt->o->parent()); 976 } 977 ... 1002 \return -1 if this point is closer than any previous check, and this is the 1003 new distance to beat. 1004 */ 1005 -int fld::app::Snap_Action::check_x_(Snap_Data &d, int x_ref, -int x_snap) { 1005 +int fld::app::Snap_Action::check_x_(fld::app::Snap_Data &d, i +nt x_ref, int x_snap) { 1006 int dd = x_ref + d.dx - x_snap; 1007 int d2 = abs(dd); 1008 if (d2 > d.x_dist) return 1; ... 1015 1016 /** 1017 \brief Check if a snap action has reached a preferred y posi tion. 1018 - \see fld::app::Snap_Action::check_x_(Snap_Data &d, int x_ref -, int x_snap) 1018 + \see fld::app::Snap_Action::check_x_(fld::app::Snap_Data &d, + int x_ref, int x_snap) 1019 */ 1020 -int fld::app::Snap_Action::check_y_(Snap_Data &d, int y_ref, -int y_snap) { 1020 +int fld::app::Snap_Action::check_y_(fld::app::Snap_Data &d, i +nt y_ref, int y_snap) { 1021 int dd = y_ref + d.dy - y_snap; 1022 int d2 = abs(dd); 1023 if (d2 > d.y_dist) return 1; ... 1030 1031 /** 1032 \brief Check if a snap action has reached a preferred x and y position. 1033 - \see fld::app::Snap_Action::check_x_(Snap_Data &d, int x_ref -, int x_snap) 1033 + \see fld::app::Snap_Action::check_x_(fld::app::Snap_Data &d, + int x_ref, int x_snap) 1034 */ 1035 -void fld::app::Snap_Action::check_x_y_(Snap_Data &d, int x_re -f, int x_snap, int y_ref, int y_snap) { 1035 +void fld::app::Snap_Action::check_x_y_(fld::app::Snap_Data &d +, int x_ref, int x_snap, int y_ref, int y_snap) { 1036 int ddx = x_ref + d.dx - x_snap; 1037 int d2x = abs(ddx); 1038 int ddy = y_ref + d.dy - y_snap; ... 1053 should be drawn. 1054 \param[inout] d current event data 1055 */ 1056 -bool fld::app::Snap_Action::matches(Snap_Data &d) { 1056 +bool fld::app::Snap_Action::matches(fld::app::Snap_Data &d) { 1057 switch (type) { 1058 case 1: return (d.drag & mask) && (eex == ex) && (d.dx == dx); 1059 case 2: return (d.drag & mask) && (eey == ey) && (d.dy == dy); ... 1066 \brief Run through all possible snap actions and store the w inning coordinates in eex and eey. 1067 \param[inout] d current event data 1068 */ 1069 -void fld::app::Snap_Action::check_all(Snap_Data &data) { 1069 +void fld::app::Snap_Action::check_all(fld::app::Snap_Data &da +ta) { 1070 int i; 1071 for (i =0; list[i]; i++) { 1072 if (list[i]->mask & data.drag) ... 1083 coordinate, all of them will be drawn. 1084 \param[inout] d current event data 1085 */ 1086 -void fld::app::Snap_Action::draw_all(Snap_Data &data) { 1086 +void fld::app::Snap_Action::draw_all(fld::app::Snap_Data &dat +a) { 1087 int i; 1088 for (i =0; list[i]; i++) { 1089 if (list[i]->matches(data)) ... 1184 */ 1185 class Fd_Snap_Left_Window_Edge : public Fd_Snap_Left { 1186 public: 1187 - void check(Snap_Data &d) { clr(); check_x_(d, d.bx, 0); } 1188 - void draw(Snap_Data &d) { draw_left_brace(d.win->o); } 1187 + void check(fld::app::Snap_Data &d) { clr(); check_x_(d, d.b +x, 0); } 1188 + void draw(fld::app::Snap_Data &d) { draw_left_brace(d.win-> +o); } 1189 }; 1190 Fd_Snap_Left_Window_Edge snap_left_window_edge; 1191 ... 1194 */ 1195 class Fd_Snap_Right_Window_Edge : public Fd_Snap_Right { 1196 public: 1197 - void check(Snap_Data &d) { clr(); check_x_(d, d.br, d.win-> -o->w()); } 1198 - void draw(Snap_Data &d) { draw_right_brace(d.win->o); } 1197 + void check(fld::app::Snap_Data &d) { clr(); check_x_(d, d.b +r, d.win->o->w()); } 1198 + void draw(fld::app::Snap_Data &d) { draw_right_brace(d.win- +>o); } 1199 }; 1200 Fd_Snap_Right_Window_Edge snap_right_window_edge; 1201 ... 1204 */ 1205 class Fd_Snap_Top_Window_Edge : public Fd_Snap_Top { 1206 public: 1207 - void check(Snap_Data &d) { clr(); check_y_(d, d.by, 0); } 1208 - void draw(Snap_Data &d) { draw_top_brace(d.win->o); } 1207 + void check(fld::app::Snap_Data &d) { clr(); check_y_(d, d.b +y, 0); } 1208 + void draw(fld::app::Snap_Data &d) { draw_top_brace(d.win->o +); } 1209 }; 1210 Fd_Snap_Top_Window_Edge snap_top_window_edge; 1211 ... 1214 */ 1215 class Fd_Snap_Bottom_Window_Edge : public Fd_Snap_Bottom { 1216 public: 1217 - void check(Snap_Data &d) { clr(); check_y_(d, d.bt, d.win-> -o->h()); } 1218 - void draw(Snap_Data &d) { draw_bottom_brace(d.win->o); } 1217 + void check(fld::app::Snap_Data &d) { clr(); check_y_(d, d.b +t, d.win->o->h()); } 1218 + void draw(fld::app::Snap_Data &d) { draw_bottom_brace(d.win +->o); } 1219 }; 1220 Fd_Snap_Bottom_Window_Edge snap_bottom_window_edge; 1221 ... 1224 */ 1225 class Fd_Snap_Left_Window_Margin : public Fd_Snap_Left { 1226 public: 1227 - void check(Snap_Data &d) { 1227 + void check(fld::app::Snap_Data &d) { 1228 clr(); 1229 if (in_window(d)) check_x_(d, d.bx, Fluid.proj.layout->le ft_window_margin); 1230 } 1231 - void draw(Snap_Data &d) { 1231 + void draw(fld::app::Snap_Data &d) { 1232 draw_h_arrow(d.bx, (d.by+d.bt)/2, 0); 1233 } 1234 }; ... 1236 1237 class Fd_Snap_Right_Window_Margin : public Fd_Snap_Right { 1238 public: 1239 - void check(Snap_Data &d) { 1239 + void check(fld::app::Snap_Data &d) { 1240 clr(); 1241 if (in_window(d)) check_x_(d, d.br, d.win->o->w()-Fluid.p roj.layout->right_window_margin); 1242 } 1243 - void draw(Snap_Data &d) { 1243 + void draw(fld::app::Snap_Data &d) { 1244 draw_h_arrow(d.br, (d.by+d.bt)/2, d.win->o->w()-1); 1245 } 1246 }; ... 1248 1249 class Fd_Snap_Top_Window_Margin : public Fd_Snap_Top { 1250 public: 1251 - void check(Snap_Data &d) { 1251 + void check(fld::app::Snap_Data &d) { 1252 clr(); 1253 if (in_window(d)) check_y_(d, d.by, Fluid.proj.layout->to p_window_margin); 1254 } 1255 - void draw(Snap_Data &d) { 1255 + void draw(fld::app::Snap_Data &d) { 1256 draw_v_arrow((d.bx+d.br)/2, d.by, 0); 1257 } 1258 }; ... 1260 1261 class Fd_Snap_Bottom_Window_Margin : public Fd_Snap_Bottom { 1262 public: 1263 - void check(Snap_Data &d) { 1263 + void check(fld::app::Snap_Data &d) { 1264 clr(); 1265 if (in_window(d)) check_y_(d, d.bt, d.win->o->h()-Fluid.p roj.layout->bottom_window_margin); 1266 } 1267 - void draw(Snap_Data &d) { 1267 + void draw(fld::app::Snap_Data &d) { 1268 draw_v_arrow((d.bx+d.br)/2, d.bt, d.win->o->h()-1); 1269 } 1270 }; ... 1277 */ 1278 class Fd_Snap_Left_Group_Edge : public Fd_Snap_Left { 1279 public: 1280 - void check(Snap_Data &d) { 1280 + void check(fld::app::Snap_Data &d) { 1281 clr(); 1282 if (in_group(d)) check_x_(d, d.bx, parent(d)->x()); 1283 } 1284 - void draw(Snap_Data &d) { 1284 + void draw(fld::app::Snap_Data &d) { 1285 draw_left_brace(parent(d)); 1286 } 1287 }; ... 1289 1290 class Fd_Snap_Right_Group_Edge : public Fd_Snap_Right { 1291 public: 1292 - void check(Snap_Data &d) { 1292 + void check(fld::app::Snap_Data &d) { 1293 clr(); 1294 if (in_group(d)) check_x_(d, d.br, parent(d)->x() + paren t(d)->w()); 1295 } 1296 - void draw(Snap_Data &d) { 1296 + void draw(fld::app::Snap_Data &d) { 1297 draw_right_brace(parent(d)); 1298 } 1299 }; ... 1301 1302 class Fd_Snap_Top_Group_Edge : public Fd_Snap_Top { 1303 public: 1304 - void check(Snap_Data &d) { 1304 + void check(fld::app::Snap_Data &d) { 1305 clr(); 1306 if (in_group(d)) check_y_(d, d.by, parent(d)->y()); 1307 } 1308 - void draw(Snap_Data &d) { 1308 + void draw(fld::app::Snap_Data &d) { 1309 draw_top_brace(parent(d)); 1310 } 1311 }; ... 1313 1314 class Fd_Snap_Bottom_Group_Edge : public Fd_Snap_Bottom { 1315 public: 1316 - void check(Snap_Data &d) { 1316 + void check(fld::app::Snap_Data &d) { 1317 clr(); 1318 if (in_group(d)) check_y_(d, d.bt, parent(d)->y() + paren t(d)->h()); 1319 } 1320 - void draw(Snap_Data &d) { 1320 + void draw(fld::app::Snap_Data &d) { 1321 draw_bottom_brace(parent(d)); 1322 } 1323 }; ... 1329 */ 1330 class Fd_Snap_Left_Group_Margin : public Fd_Snap_Left { 1331 public: 1332 - void check(Snap_Data &d) { 1332 + void check(fld::app::Snap_Data &d) { 1333 clr(); 1334 if (in_group(d)) check_x_(d, d.bx, parent(d)->x() + Fluid .proj.layout->left_group_margin); 1335 } 1336 - void draw(Snap_Data &d) { 1336 + void draw(fld::app::Snap_Data &d) { 1337 draw_left_brace(parent(d)); 1338 draw_h_arrow(d.bx, (d.by+d.bt)/2, parent(d)->x()); 1339 } ... 1342 1343 class Fd_Snap_Right_Group_Margin : public Fd_Snap_Right { 1344 public: 1345 - void check(Snap_Data &d) { 1345 + void check(fld::app::Snap_Data &d) { 1346 clr(); 1347 if (in_group(d)) check_x_(d, d.br, parent(d)->x()+parent( d)->w()-Fluid.proj.layout->right_group_margin); 1348 } 1349 - void draw(Snap_Data &d) { 1349 + void draw(fld::app::Snap_Data &d) { 1350 draw_right_brace(parent(d)); 1351 draw_h_arrow(d.br, (d.by+d.bt)/2, parent(d)->x()+parent(d )->w()-1); 1352 } ... 1355 1356 class Fd_Snap_Top_Group_Margin : public Fd_Snap_Top { 1357 public: 1358 - void check(Snap_Data &d) { 1358 + void check(fld::app::Snap_Data &d) { 1359 clr(); 1360 if (in_group(d) && !in_tabs(d)) check_y_(d, d.by, parent( d)->y()+Fluid.proj.layout->top_group_margin); 1361 } 1362 - void draw(Snap_Data &d) { 1362 + void draw(fld::app::Snap_Data &d) { 1363 draw_top_brace(parent(d)); 1364 draw_v_arrow((d.bx+d.br)/2, d.by, parent(d)->y()); 1365 } ... 1368 1369 class Fd_Snap_Bottom_Group_Margin : public Fd_Snap_Bottom { 1370 public: 1371 - void check(Snap_Data &d) { 1371 + void check(fld::app::Snap_Data &d) { 1372 clr(); 1373 if (in_group(d) && !in_tabs(d)) check_y_(d, d.bt, parent( d)->y()+parent(d)->h()-Fluid.proj.layout->bottom_group_margin ); 1374 } 1375 - void draw(Snap_Data &d) { 1375 + void draw(fld::app::Snap_Data &d) { 1376 draw_bottom_brace(parent(d)); 1377 draw_v_arrow((d.bx+d.br)/2, d.bt, parent(d)->y()+parent(d )->h()-1); 1378 } ... 1386 */ 1387 class Fd_Snap_Top_Tabs_Margin : public Fd_Snap_Top_Group_Marg in { 1388 public: 1389 - void check(Snap_Data &d) { 1389 + void check(fld::app::Snap_Data &d) { 1390 clr(); 1391 if (in_tabs(d)) check_y_(d, d.by, parent(d)->y()+Fluid.pr oj.layout->top_tabs_margin); 1392 } ... 1395 1396 class Fd_Snap_Bottom_Tabs_Margin : public Fd_Snap_Bottom_Grou p_Margin { 1397 public: 1398 - void check(Snap_Data &d) { 1398 + void check(fld::app::Snap_Data &d) { 1399 clr(); 1400 if (in_tabs(d)) check_y_(d, d.bt, parent(d)->y()+parent(d )->h()-Fluid.proj.layout->bottom_tabs_margin); 1401 } ... 1412 int nearest_x, nearest_y; 1413 public: 1414 Fd_Snap_Grid() { type = 3; mask = FD_LEFT|FD_TOP|FD_DRAG; } 1415 - void check_grid(Snap_Data &d, int left, int grid_x, int rig -ht, int top, int grid_y, int bottom) { 1415 + void check_grid(fld::app::Snap_Data &d, int left, int grid_ +x, int right, int top, int grid_y, int bottom) { 1416 if ((grid_x <= 1) || (grid_y <= 1)) return; 1417 int suggested_x = d.bx + d.dx; 1418 nearest_x = nearest(suggested_x, left, grid_x, right); ... 1425 else 1426 check_x_y_(d, d.bx, nearest_x, d.by, nearest_y); 1427 } 1428 - bool matches(Snap_Data &d) { 1428 + bool matches(fld::app::Snap_Data &d) { 1429 if (d.drag == FD_LEFT) return (eex == ex); 1430 if (d.drag == FD_TOP) return (eey == ey) && (d.dx == dx); 1431 return (d.drag & mask) && (eex == ex) && (d.dx == dx) && (eey == ey) && (d.dy == dy); ... 1437 */ 1438 class Fd_Snap_Window_Grid : public Fd_Snap_Grid { 1439 public: 1440 - void check(Snap_Data &d) { 1440 + void check(fld::app::Snap_Data &d) { 1441 fld::app::Layout_Preset *layout = Fluid.proj.layout; 1442 clr(); 1443 if (in_window(d)) check_grid(d, layout->left_window_margi n, layout->window_grid_x, d.win->o->w()-layout->right_window_ margin, 1444 layout->top_window_margin, l ayout->window_grid_y, d.win->o->h()-layout->bottom_window_mar gin); 1445 } 1446 - void draw(Snap_Data &d) { 1446 + void draw(fld::app::Snap_Data &d) { 1447 fld::app::Layout_Preset *layout = Fluid.proj.layout; 1448 draw_grid(nearest_x, nearest_y, layout->window_grid_x, la yout->window_grid_y); 1449 } ... 1455 */ 1456 class Fd_Snap_Group_Grid : public Fd_Snap_Grid { 1457 public: 1458 - void check(Snap_Data &d) { 1458 + void check(fld::app::Snap_Data &d) { 1459 if (in_group(d)) { 1460 fld::app::Layout_Preset *layout = Fluid.proj.layout; 1461 clr(); ... 1464 g->y()+layout->top_group_margin, layout->gro up_grid_y, g->y()+g->h()-layout->bottom_group_margin); 1465 } 1466 } 1467 - void draw(Snap_Data &d) { 1467 + void draw(fld::app::Snap_Data &d) { 1468 fld::app::Layout_Preset *layout = Fluid.proj.layout; 1469 draw_grid(nearest_x, nearest_y, layout->group_grid_x, lay out->group_grid_y); 1470 } ... 1481 Fl_Widget *best_match; 1482 public: 1483 Fd_Snap_Sibling() : best_match(0) { } 1484 - virtual int sibling_check(Snap_Data &d, Fl_Widget *s) = 0; 1485 - void check(Snap_Data &d) { 1484 + virtual int sibling_check(fld::app::Snap_Data &d, Fl_Widget + *s) = 0; 1485 + void check(fld::app::Snap_Data &d) { 1486 clr(); 1487 best_match = 0; 1488 if (!d.wgt) return; ... 1517 class Fd_Snap_Siblings_Left_Same : public Fd_Snap_Sibling { 1518 public: 1519 Fd_Snap_Siblings_Left_Same() { type = 1; mask = FD_LEFT|FD_ DRAG; } 1520 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1520 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1521 return check_x_(d, d.bx, s->x()); 1522 } 1523 - void draw(Snap_Data &d) { 1523 + void draw(fld::app::Snap_Data &d) { 1524 if (best_match) draw_left_brace(best_match); 1525 } 1526 }; ... 1532 class Fd_Snap_Siblings_Left : public Fd_Snap_Sibling { 1533 public: 1534 Fd_Snap_Siblings_Left() { type = 1; mask = FD_LEFT|FD_DRAG; } 1535 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1535 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1536 return MIN(check_x_(d, d.bx, s->x()+s->w()), 1537 check_x_(d, d.bx, s->x()+s->w()+Fluid.proj. layout->widget_gap_x) ); 1538 } 1539 - void draw(Snap_Data &d) { 1539 + void draw(fld::app::Snap_Data &d) { 1540 if (best_match) draw_right_brace(best_match); 1541 } 1542 }; ... 1545 class Fd_Snap_Siblings_Right_Same : public Fd_Snap_Sibling { 1546 public: 1547 Fd_Snap_Siblings_Right_Same() { type = 1; mask = FD_RIGHT|F D_DRAG; } 1548 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1548 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1549 return check_x_(d, d.br, s->x()+s->w()); 1550 } 1551 - void draw(Snap_Data &d) { 1551 + void draw(fld::app::Snap_Data &d) { 1552 if (best_match) draw_right_brace(best_match); 1553 } 1554 }; ... 1557 class Fd_Snap_Siblings_Right : public Fd_Snap_Sibling { 1558 public: 1559 Fd_Snap_Siblings_Right() { type = 1; mask = FD_RIGHT|FD_DRA G; } 1560 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1560 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1561 return MIN(check_x_(d, d.br, s->x()), 1562 check_x_(d, d.br, s->x()-Fluid.proj.layout- >widget_gap_x)); 1563 } 1564 - void draw(Snap_Data &d) { 1564 + void draw(fld::app::Snap_Data &d) { 1565 if (best_match) draw_left_brace(best_match); 1566 } 1567 }; ... 1570 class Fd_Snap_Siblings_Top_Same : public Fd_Snap_Sibling { 1571 public: 1572 Fd_Snap_Siblings_Top_Same() { type = 2; mask = FD_TOP|FD_DR AG; } 1573 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1573 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1574 return check_y_(d, d.by, s->y()); 1575 } 1576 - void draw(Snap_Data &d) { 1576 + void draw(fld::app::Snap_Data &d) { 1577 if (best_match) draw_top_brace(best_match); 1578 } 1579 }; ... 1582 class Fd_Snap_Siblings_Top : public Fd_Snap_Sibling { 1583 public: 1584 Fd_Snap_Siblings_Top() { type = 2; mask = FD_TOP|FD_DRAG; } 1585 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1585 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1586 return MIN(check_y_(d, d.by, s->y()+s->h()), 1587 check_y_(d, d.by, s->y()+s->h()+Fluid.proj. layout->widget_gap_y)); 1588 } 1589 - void draw(Snap_Data &d) { 1589 + void draw(fld::app::Snap_Data &d) { 1590 if (best_match) draw_bottom_brace(best_match); 1591 } 1592 }; ... 1595 class Fd_Snap_Siblings_Bottom_Same : public Fd_Snap_Sibling { 1596 public: 1597 Fd_Snap_Siblings_Bottom_Same() { type = 2; mask = FD_BOTTOM |FD_DRAG; } 1598 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1598 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1599 return check_y_(d, d.bt, s->y()+s->h()); 1600 } 1601 - void draw(Snap_Data &d) { 1601 + void draw(fld::app::Snap_Data &d) { 1602 if (best_match) draw_bottom_brace(best_match); 1603 } 1604 }; ... 1607 class Fd_Snap_Siblings_Bottom : public Fd_Snap_Sibling { 1608 public: 1609 Fd_Snap_Siblings_Bottom() { type = 2; mask = FD_BOTTOM|FD_D RAG; } 1610 - int sibling_check(Snap_Data &d, Fl_Widget *s) { 1610 + int sibling_check(fld::app::Snap_Data &d, Fl_Widget *s) { 1611 return MIN(check_y_(d, d.bt, s->y()), 1612 check_y_(d, d.bt, s->y()-Fluid.proj.layout- >widget_gap_y)); 1613 } 1614 - void draw(Snap_Data &d) { 1614 + void draw(fld::app::Snap_Data &d) { 1615 if (best_match) draw_top_brace(best_match); 1616 } 1617 }; ... 1626 class Fd_Snap_Widget_Ideal_Width : public Snap_Action { 1627 public: 1628 Fd_Snap_Widget_Ideal_Width() { type = 1; mask = FD_LEFT|FD_ RIGHT; } 1629 - void check(Snap_Data &d) { 1629 + void check(fld::app::Snap_Data &d) { 1630 fld::app::Layout_Preset *layout = Fluid.proj.layout; 1631 clr(); 1632 if (!d.wgt) return; ... 1644 check_x_(d, d.bx, d.br-iw); 1645 } 1646 } 1647 - void draw(Snap_Data &d) { 1647 + void draw(fld::app::Snap_Data &d) { 1648 draw_width(d.bx, d.bt+7, d.br, 0); 1649 } 1650 }; ... 1653 class Fd_Snap_Widget_Ideal_Height : public Snap_Action { 1654 public: 1655 Fd_Snap_Widget_Ideal_Height() { type = 2; mask = FD_TOP|FD_ BOTTOM; } 1656 - void check(Snap_Data &d) { 1656 + void check(fld::app::Snap_Data &d) { 1657 fld::app::Layout_Preset *layout = Fluid.proj.layout; 1658 clr(); 1659 if (!d.wgt) return; ... 1671 check_y_(d, d.by, d.bt-ih); 1672 } 1673 } 1674 - void draw(Snap_Data &d) { 1674 + void draw(fld::app::Snap_Data &d) { 1675 draw_height(d.br+7, d.by, d.bt, 0); 1676 } 1677 }; ⏺ Bash(sed -i '' 's/fld::app::fld::app::/fld::app::/g' fluid/app/Snap_Action.cxx make 2>&1 | grep -E "error:" | head -15) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Сборка успешна. Финальная проверка. ⏺ Bash(grep -rn '^using namespace' fluid/ --include="*.cxx" --include="*.h" --include="*.H" 2>/dev/null | grep -v WIN32 && echo "=== Build ===" && make 2>&1 | tail -5) ⎿  Error: Exit code 1 /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mnik01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Bash(make 2>&1 | tail -10) ⎿ 1814 | sprintf(buf, "%d", w); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio. … +14 lines (ctrl+o to expand) ⏺ Bash(make 2>&1 | grep -E "error:" | head -15) ⎿ fluid/app/Snap_Action.cxx:627:15: error: '~' in destructor name should be after nested name specifier fluid/app/Snap_Action.cxx:627:15: error: qualified member access refers … +21 lines (ctrl+o to expand) ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 10 lines ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 1 line, removed 1 line 624 for (i = 0; i < list_size_; i++) { 625 fld::app::Layout_Suite &suite = list_[i]; 626 if (suite.storage_ != FLD_TOOL_STORE_INTERNAL) 627 - suite.~fld::app::Layout_Suite(); 627 + suite.fld::app::Layout_Suite::~Layout_Suite(); 628 } 629 ::free(list_); 630 } ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 15 lines ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 8 lines, removed 8 lines 1148 /** 1149 Base class for all actions that drag the left side or the en tire widget. 1150 */ 1151 -class Fd_Snap_Left : public Snap_Action { 1151 +class Fd_Snap_Left : public fld::app::Snap_Action { 1152 public: 1153 Fd_Snap_Left() { type = 1; mask = FD_LEFT|FD_DRAG; } 1154 }; ... 1156 /** 1157 Base class for all actions that drag the right side or the e ntire widget. 1158 */ 1159 -class Fd_Snap_Right : public Snap_Action { 1159 +class Fd_Snap_Right : public fld::app::Snap_Action { 1160 public: 1161 Fd_Snap_Right() { type = 1; mask = FD_RIGHT|FD_DRAG; } 1162 }; ... 1164 /** 1165 Base class for all actions that drag the top side or the ent ire widget. 1166 */ 1167 -class Fd_Snap_Top : public Snap_Action { 1167 +class Fd_Snap_Top : public fld::app::Snap_Action { 1168 public: 1169 Fd_Snap_Top() { type = 2; mask = FD_TOP|FD_DRAG; } 1170 }; ... 1172 /** 1173 Base class for all actions that drag the bottom side or the entire widget. 1174 */ 1175 -class Fd_Snap_Bottom : public Snap_Action { 1175 +class Fd_Snap_Bottom : public fld::app::Snap_Action { 1176 public: 1177 Fd_Snap_Bottom() { type = 2; mask = FD_BOTTOM|FD_DRAG; } 1178 }; ... 1407 /** 1408 Base class for grid based snapping. 1409 */ 1410 -class Fd_Snap_Grid : public Snap_Action { 1410 +class Fd_Snap_Grid : public fld::app::Snap_Action { 1411 protected: 1412 int nearest_x, nearest_y; 1413 public: ... 1476 /** 1477 Base class the check distance to other widgets in the same g roup. 1478 */ 1479 -class Fd_Snap_Sibling : public Snap_Action { 1479 +class Fd_Snap_Sibling : public fld::app::Snap_Action { 1480 protected: 1481 Fl_Widget *best_match; 1482 public: ... 1623 /** 1624 Snap horizontal resizing to min_w or min_w and a multiple of inc_w. 1625 */ 1626 -class Fd_Snap_Widget_Ideal_Width : public Snap_Action { 1626 +class Fd_Snap_Widget_Ideal_Width : public fld::app::Snap_Acti +on { 1627 public: 1628 Fd_Snap_Widget_Ideal_Width() { type = 1; mask = FD_LEFT|FD_ RIGHT; } 1629 void check(fld::app::Snap_Data &d) { ... 1650 }; 1651 Fd_Snap_Widget_Ideal_Width snap_widget_ideal_width; 1652 1653 -class Fd_Snap_Widget_Ideal_Height : public Snap_Action { 1653 +class Fd_Snap_Widget_Ideal_Height : public fld::app::Snap_Act +ion { 1654 public: 1655 Fd_Snap_Widget_Ideal_Height() { type = 2; mask = FD_TOP|FD_ BOTTOM; } 1656 void check(fld::app::Snap_Data &d) { ⏺ Read(fluid/app/Snap_Action.cxx) ⎿  Read 10 lines ⏺ Update(fluid/app/Snap_Action.cxx) ⎿  Added 1 line, removed 1 line 1686 action in the list wins. All snap actions with the same dist ance and same 1687 winning coordinates are drawn in the overlay plane. 1688 */ 1689 -Snap_Action *fld::app::Snap_Action::list[] = { 1689 +fld::app::Snap_Action *fld::app::Snap_Action::list[] = { 1690 &snap_left_window_edge, 1691 &snap_right_window_edge, 1692 &snap_top_window_edge, ⏺ Bash(make 2>&1 | grep -E "error:" | head -10) ⎿ /Users/mnik01/.zprofile:source:3: no such file or directory: /Users/mni k01/Desktop/hobby/emsdk/emsdk_env.sh ⏺ Сборка успешна! Обновлю todo. ⏺ Фаза 5 завершена. Финальная проверка. ⏺ Bash(echo "=== using namespace in fluid ===" && grep -rn '^using namespace' fluid/ --include="*.cxx" --include="*.h" --include="*.H" 2>/dev/null | grep -v WIN32 || e…) ⎿  === using namespace in fluid === None found echo echo === namespace declarations in fluid === 55 … +2 lines (ctrl+o to expand) ⏺ Итоговое состояние: - Все using namespace удалены из FLUID - Осталось 55 namespace объявлений в заголовочных файлах (для полного удаления нужен большой рефакторинг с переименованием классов) Завершённые фазы: - Фаза 3: Механическая C++ очистка (override, auto, nullptr, constexpr, enum class, for-loop) - Фаза 4: Удаление Fl::Private/Fl::Pen namespaces - Фаза 5: Удаление using namespace из FLUID - Фаза 7: Bundling Xlib - Фаза 8: Cairo/Pango стратегия Отложено: - Фаза 4b: Конвертация namespace Fl в class Fl (major API refactor) Проект компилируется без ошибок. ✻ Crunched for 1h 24m 33s