diff --git a/doc/src/Howto_lammps_gui.rst b/doc/src/Howto_lammps_gui.rst index 658dcf58cc..465f6e5864 100644 --- a/doc/src/Howto_lammps_gui.rst +++ b/doc/src/Howto_lammps_gui.rst @@ -44,6 +44,31 @@ when starting again. The name of the current file in the buffer is shown in the window title and the text `*modified*` is added in case the buffer has modifications that are not yet saved to a file. +Editor Functions +^^^^^^^^^^^^^^^^ + +The editor has the usual functionality that similar programs have: text +selection via mouse or with cursor moves while holding the Shift key, +Cut, Copy, Paste, Undo, Redo. All of these editing functions are available +via hotkeys. When trying to exit the editor with a modified buffer, a +dialog will pop up asking whether to cancel the quit, or don't save or +save the buffer's contents to a file. + +Context Specific Help +^^^^^^^^^^^^^^^^^^^^^ + +.. image:: JPG/lammps-gui-popup-help.png + :align: center + :scale: 50% + +A unique feature of the LAMMPS GUI is the option to look up the +documentation for the command in the current line. This can be achieved +by either clicking the right mouse button or by using the `Ctrl-?` +hotkey. When clicking the mouse there are additional entries in the +context menu that will open the corresponding documentation page in the +online LAMMPS documentation. When using the hotkey, the first of those +entries will be chosen directly. + Menu ---- diff --git a/doc/src/JPG/lammps-gui-chart.png b/doc/src/JPG/lammps-gui-chart.png new file mode 100644 index 0000000000..447e709625 Binary files /dev/null and b/doc/src/JPG/lammps-gui-chart.png differ diff --git a/doc/src/JPG/lammps-gui-image.png b/doc/src/JPG/lammps-gui-image.png new file mode 100644 index 0000000000..dd77ce4301 Binary files /dev/null and b/doc/src/JPG/lammps-gui-image.png differ diff --git a/doc/src/JPG/lammps-gui-log.png b/doc/src/JPG/lammps-gui-log.png new file mode 100644 index 0000000000..1e9b9533f0 Binary files /dev/null and b/doc/src/JPG/lammps-gui-log.png differ diff --git a/doc/src/JPG/lammps-gui-popup-help.png b/doc/src/JPG/lammps-gui-popup-help.png new file mode 100644 index 0000000000..0d692f1795 Binary files /dev/null and b/doc/src/JPG/lammps-gui-popup-help.png differ diff --git a/doc/src/JPG/lammps-gui-running.png b/doc/src/JPG/lammps-gui-running.png new file mode 100644 index 0000000000..7df06156a4 Binary files /dev/null and b/doc/src/JPG/lammps-gui-running.png differ diff --git a/tools/lammps-gui/codeeditor.cpp b/tools/lammps-gui/codeeditor.cpp index baa18c5e75..a259e25c51 100644 --- a/tools/lammps-gui/codeeditor.cpp +++ b/tools/lammps-gui/codeeditor.cpp @@ -207,6 +207,11 @@ void CodeEditor::contextMenuEvent(QContextMenuEvent *event) connect(action2, &QAction::triggered, this, &CodeEditor::open_help); } } + auto action3 = menu->addAction(QString("LAMMPS Manual")); + action3->setIcon(QIcon(":/help-browser.png")); + action3->setData(QString()); + connect(action3, &QAction::triggered, this, &CodeEditor::open_help); + menu->exec(event->globalPos()); delete menu; } diff --git a/tools/lammps-gui/lammpsgui.qrc b/tools/lammps-gui/lammpsgui.qrc index caf65ffc78..bbcd6eb7f7 100644 --- a/tools/lammps-gui/lammpsgui.qrc +++ b/tools/lammps-gui/lammpsgui.qrc @@ -8,6 +8,9 @@ system-help.png + + help-browser.png + gtk-zoom-in.png