Skip to content

Commit

Permalink
Unify documentation terminology to "Code View"
Browse files Browse the repository at this point in the history
Some docs were still using "Source View". We will have to
update this in the FLUID source code too.
  • Loading branch information
MatthiasWM committed Apr 12, 2024
1 parent bc6c048 commit 453782f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions fluid/Fl_Widget_Type.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();
}

Expand Down
4 changes: 2 additions & 2 deletions fluid/autodoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fluid/documentation/src/page_appendices.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
14 changes: 7 additions & 7 deletions fluid/documentation/src/page_tutorial.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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__.
Expand All @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fluid/documentation/src/page_widget_panel.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions fluid/fluid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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();
}
Expand Down
6 changes: 3 additions & 3 deletions fluid/sourceview_panel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 453782f

Please sign in to comment.