From 453782f0cb1aa2679c003d68e0df30cda12d1823 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 12 Apr 2024 17:15:25 +0200 Subject: [PATCH] Unify documentation terminology to "Code View" Some docs were still using "Source View". We will have to update this in the FLUID source code too. --- fluid/Fl_Widget_Type.cxx | 4 ++-- fluid/autodoc.cxx | 4 ++-- fluid/documentation/src/page_appendices.dox | 2 +- fluid/documentation/src/page_tutorial.dox | 14 +++++++------- fluid/documentation/src/page_widget_panel.dox | 2 +- fluid/fluid.cxx | 6 +++--- fluid/sourceview_panel.cxx | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index d223fba861..1ca0e97fcf 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -383,7 +383,7 @@ void name_public_cb(Fl_Choice* i, void* v) { /* Treating UNDO for text widget. Goal: we want to continuously update the UI while the user is typing text - (changing the label, in this case). Source View does deferred updates, and + (changing the label, in this case). Code View does deferred updates, and the widget browser and widget panel update on every keystroke. At the same time, we want to limit undo actions to few and logical units. @@ -2761,7 +2761,7 @@ void selection_changed(Fl_Type *p) { redraw_overlays(); // load the panel with the new settings: load_panel(); - // update the source viewer to show the code for the selected object + // update the code viewer to show the code for the selected object update_sourceview_position(); } diff --git a/fluid/autodoc.cxx b/fluid/autodoc.cxx index 0aa6d8958a..6362f1a912 100644 --- a/fluid/autodoc.cxx +++ b/fluid/autodoc.cxx @@ -404,7 +404,7 @@ void run_autodoc(const Fl_String &target_dir) { // TODO: explain FLUID command line usage // TODO: take a snapshot of FLUID in a desktop situation - // (main, toolbar, document, widget editor, source view) + // (main, toolbar, document, widget editor, code view) // ---- main window // explain titlebar @@ -437,7 +437,7 @@ void run_autodoc(const Fl_String &target_dir) { if (!widgetbin_panel) make_widgetbin(); fl_snapshot((target_dir + "widgetbin_panel.png").c_str(), widgetbin_panel, win_margin, win_blend); - // ---- source view + // ---- code view // explain functionality // explain live update and choices // show various tabs diff --git a/fluid/documentation/src/page_appendices.dox b/fluid/documentation/src/page_appendices.dox index ff9274efb3..2124186dcd 100644 --- a/fluid/documentation/src/page_appendices.dox +++ b/fluid/documentation/src/page_appendices.dox @@ -37,7 +37,7 @@ On Apple computers, use the Apple Command key instead of Ctrl. | `Ctrl-Q` | quit FLUID | | `Ctrl-S` | save project | | `Shift-Ctrl-S` | save project with new name | -| `Shift-Alt-S` | show or hide source view window | +| `Shift-Alt-S` | show or hide code view window | | `Ctrl-U` | duplicate selected widgets | | `Ctrl-V` | paste last copied widgets | | `Shift-Ctrl-W` | write i18n translation file | diff --git a/fluid/documentation/src/page_tutorial.dox b/fluid/documentation/src/page_tutorial.dox index 1045505a75..efae9c2d57 100644 --- a/fluid/documentation/src/page_tutorial.dox +++ b/fluid/documentation/src/page_tutorial.dox @@ -17,12 +17,12 @@ types. It can be opened via the main menu: __Edit > Show Widget Bin__, or using the shortcut __Alt-B__. - The second very helpful tool box is the "Source View". The source view gives + The second very helpful tool box is the "Code View". The Code View gives a preview of the code as it will be generated by FLUID. All changes in the - scene graph or in attributes are reflected immediately in the source view. - Choose __Edit > Show Source View__ or press __SHift-Alt-S__ to get this + scene graph or in attributes are reflected immediately in the Code View. + Choose __Edit > Show Code View__ or press __SHift-Alt-S__ to get this toolbox. Make sure that _Auto-Refresh_ and _Auto-Position_ are active in - the source view. + the Code View. Let's start Hello World from scratch. If there is already a previous project loaded, select __File > New__ or __Ctrl-N__. @@ -42,7 +42,7 @@ \image html fluid4.png "the Function/Method Properties dialog" \image latex fluid4.png "the Function/Method Properties dialog" - Note that the function will not show up in the source view yet. FLUID will + Note that the function will not show up in the Code View yet. FLUID will not generate code for functions that don't have any content, and only create a forward declaration in the header file, assuming that the function will be implemented inside another module. @@ -59,14 +59,14 @@ A new application window will open up on the desktop. The thin red outline around the window indicates that it is selected. Dragging the red line will - resize the window. Take a look at the source view: the main function + resize the window. Take a look at the Code View: the main function is now generated, including code to instantiate our `Fl_Window`. To edit all the attributes of our window, make sure it is selected and press __F1__, or double-click the entry in the main FLUID window, or double-click the window itself. The "Widget Properties" dialog box will pop up. Enter some text in the "Label:" text box and see how the label is updated immediately - in the window itself, in the widget list, and in the source view. + in the window itself, in the widget list, and in the Code View. Adding a static text to our window is just as easy. Add an `Fl_Box` to our window by selecting __New > Other > Box__, or by clicking on the diff --git a/fluid/documentation/src/page_widget_panel.dox b/fluid/documentation/src/page_widget_panel.dox index 9c7bc0cdf1..73d9b23a78 100644 --- a/fluid/documentation/src/page_widget_panel.dox +++ b/fluid/documentation/src/page_widget_panel.dox @@ -25,7 +25,7 @@ All changes in the widget panel are immediately applied to all selected widgets and their effect can be seen in the project window. It can be very - useful to keep the *Source View* window open at all times. All code changes + useful to keep the *Code View* window open at all times. All code changes appear instantly for all generated files if *Auto-Refresh* is active. FLUID generates only code for properties that differ from their default diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 53d2b78c23..2708b06c70 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -133,7 +133,7 @@ Fl_Menu_Item *history_item = NULL; /// Menuitem to show or hide the widget bin, label will change if bin is visible. Fl_Menu_Item *widgetbin_item = NULL; -/// Menuitem to show or hide the source view, label will change if view is visible. +/// Menuitem to show or hide the code view, label will change if view is visible. Fl_Menu_Item *sourceview_item = NULL; /// Menuitem to show or hide the editing overlay, label will change if overlay visibility changes. @@ -1700,7 +1700,7 @@ Fl_Menu_Item Main_Menu[] = { {"Hide Guides",FL_COMMAND+FL_SHIFT+'g',toggle_guides}, {"Hide Restricted",FL_COMMAND+FL_SHIFT+'r',toggle_restricted}, {"Show Widget &Bin...",FL_ALT+'b',toggle_widgetbin_cb}, - {"Show Source View",FL_ALT+FL_SHIFT+'s', (Fl_Callback*)toggle_sourceview_cb, 0, FL_MENU_DIVIDER}, + {"Show Code View",FL_ALT+FL_SHIFT+'s', (Fl_Callback*)toggle_sourceview_cb, 0, FL_MENU_DIVIDER}, {"Settings...",FL_ALT+'p',show_settings_cb}, {0}, {"&New", 0, 0, (void *)New_Menu, FL_SUBMENU_POINTER}, @@ -2057,7 +2057,7 @@ void set_modflag(int mf, int mfc) { if (!old_title || strcmp(old_title, new_title)) main_window->copy_label(new_title); } - // if the UI was modified in any way, update the Source View panel + // if the UI was modified in any way, update the Code View panel if (sourceview_panel && sourceview_panel->visible() && sv_autorefresh->value()) sourceview_defer_update(); } diff --git a/fluid/sourceview_panel.cxx b/fluid/sourceview_panel.cxx index 8b5ef798ac..a411d29a5e 100644 --- a/fluid/sourceview_panel.cxx +++ b/fluid/sourceview_panel.cxx @@ -33,7 +33,7 @@ extern void reveal_in_browser(Fl_Type *t); Update the header and source code highlighting depending on the currently selected object - The Source View system offers an immediate preview of the code + The Code View system offers an immediate preview of the code files that will be generated by FLUID. It also marks the code generated for the last selected item in the header and the source file. @@ -249,10 +249,10 @@ void sourceview_toggle_visibility() { if (sourceview_panel->visible()) { sourceview_panel->hide(); - sourceview_item->label("Show Source View"); + sourceview_item->label("Show Code View"); } else { sourceview_panel->show(); - sourceview_item->label("Hide Source View"); + sourceview_item->label("Hide Code View"); update_sourceview_cb(0,0); } }