From 972a5cda03e854925993195d5604b868013ded3d Mon Sep 17 00:00:00 2001 From: Eugenio Parodi Date: Mon, 30 Oct 2023 22:56:46 +0000 Subject: [PATCH] Added web links to the tutorial --- README.md | 4 +-- docs/source/info/dev/clipboard.rst | 1 + docs/source/info/dev/dragdrop.rst | 1 + docs/source/info/dev/input.rst | 1 + docs/source/info/dev/paint.rst | 1 + docs/source/info/features/index.rst | 41 +++++++++++++----------- tutorial/001-helloworld.rst | 6 ++-- tutorial/002-layout.rst | 19 +++++++---- tutorial/003-signalslots.rst | 2 ++ tutorial/004-logging.rst | 4 +++ tutorial/005-calculator.rst | 5 +++ tutorial/ttkDesigner/textEdit/README.rst | 6 ++-- 12 files changed, 59 insertions(+), 32 deletions(-) create mode 100644 docs/source/info/dev/clipboard.rst create mode 100644 docs/source/info/dev/dragdrop.rst create mode 100644 docs/source/info/dev/input.rst create mode 100644 docs/source/info/dev/paint.rst diff --git a/README.md b/README.md index 8b162a71..8d51ef86 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,14 @@ and inspired by a mix of [Qt5](https://www.riverbankcomputing.com/static/Docs/Py [pyTermTk.Showcase.002.webm](https://user-images.githubusercontent.com/8876552/206490679-2bbdc909-c9bc-41c1-9a50-339b06dabecd.webm) ## [Features](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/index.html) -- Self Contained (no external lib required), Python 3.9 or above required. +- [Self Contained](https://ceccopierangiolieugenio.github.io/pyTermTk/info/installing.html) (no external lib required), Python 3.9 or above required. - [Cross compatible](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/crosscompatible.html): [Linux](https://en.wikipedia.org/wiki/Linux)🐧, [MacOS](https://en.wikipedia.org/wiki/MacOS)🍎, [MS Windows](https://en.wikipedia.org/wiki/Microsoft_Windows)🪟, [HTML5](https://en.wikipedia.org/wiki/HTML5)🌍([Try](https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html)) - [Basic widgets](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/widgets.html#base-widgets) for [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface) development (Button, Label, checkbox, ...) - [Specialized widgets](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/widgets.html#specialised-widgets) to improve the usability (Windows, Frames, Tables, ...) - QT Like Layout system to help arrange the widgets in the terminal - True color support - Ful/Half/Zero sized Unicode characters 😎 -- I am pretty sure there is something else... +- I am pretty sure there is [something else...](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/index.html) --- diff --git a/docs/source/info/dev/clipboard.rst b/docs/source/info/dev/clipboard.rst new file mode 100644 index 00000000..2fd9f957 --- /dev/null +++ b/docs/source/info/dev/clipboard.rst @@ -0,0 +1 @@ +TBD \ No newline at end of file diff --git a/docs/source/info/dev/dragdrop.rst b/docs/source/info/dev/dragdrop.rst new file mode 100644 index 00000000..2fd9f957 --- /dev/null +++ b/docs/source/info/dev/dragdrop.rst @@ -0,0 +1 @@ +TBD \ No newline at end of file diff --git a/docs/source/info/dev/input.rst b/docs/source/info/dev/input.rst new file mode 100644 index 00000000..2fd9f957 --- /dev/null +++ b/docs/source/info/dev/input.rst @@ -0,0 +1 @@ +TBD \ No newline at end of file diff --git a/docs/source/info/dev/paint.rst b/docs/source/info/dev/paint.rst new file mode 100644 index 00000000..2fd9f957 --- /dev/null +++ b/docs/source/info/dev/paint.rst @@ -0,0 +1 @@ +TBD \ No newline at end of file diff --git a/docs/source/info/features/index.rst b/docs/source/info/features/index.rst index 85160ec9..5a744eb6 100644 --- a/docs/source/info/features/index.rst +++ b/docs/source/info/features/index.rst @@ -21,35 +21,38 @@ Main features - Ful/Half/Zero sized Unicode characters 😎 - I am pretty sure there is something else... -Self Contained, :doc:`Cross Compatible ` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Self Contained, :doc:`Cross Compatible ` - | pyTermTk_ does not require external libraries (i.e. curses) - | It can be :ref:`installed through PyPi ` or simply :ref:`copy the TermTk folder ` inside the root path of any project. - | Compatible with :ref:`cc-linux`, :ref:`cc-windows`, :ref:`cc-macos`, :ref:`HTML5 ` + | pyTermTk_ does not require external libraries (i.e. curses) + | It can be :ref:`installed through PyPi ` or simply :ref:`copy the TermTk folder ` inside the root path of any project. + | Compatible with :ref:`cc-linux`, :ref:`cc-windows`, :ref:`cc-macos`, :ref:`HTML5 ` -Wide variety of built-in :ref:`widgets `, :ref:`pickers `, :ref:`layout helpers ` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Wide variety of built-in :ref:`widgets `, :ref:`pickers `, :doc:`Layout helpers <../../tutorial/002-layout>` -Clipboard support -~~~~~~~~~~~~~~~~~ +* Input/Mouse/Paste Event handling + +* Drag and Drop + +* Clipboard support + +* Drawing primitives + +* True color support + +* Ful/Half/Zero sized Unicode characters 😎 .. _features-alpha: Alpha Features -------------- - Those are the feature/poc that are not being extensively tested and can be prone to unexpected behaviour. - Their APIs may change before the final release to address bugs or improving the overall design implementation. -Text Editor -~~~~~~~~~~~ + | Those are the feature/poc that are not being extensively tested and can be prone to unexpected behaviour. + | Their APIs may change before the final release to address bugs or improving the overall design implementation. -Terminal Emulator -~~~~~~~~~~~~~~~~~ +* Text Editor -Terminal Multiplexer -~~~~~~~~~~~~~~~~~~~~ +* Terminal Emulator -ttkDesigner -~~~~~~~~~~~ +* Terminal Multiplexer +* ttkDesigner diff --git a/tutorial/001-helloworld.rst b/tutorial/001-helloworld.rst index 3a47cba0..e7fc630e 100644 --- a/tutorial/001-helloworld.rst +++ b/tutorial/001-helloworld.rst @@ -23,7 +23,8 @@ Examples Example 1 --------- -Following is the code to execute `helloworld.001.py `_ in pyTermTk_: +Following is the code to execute `helloworld.001.py `_ +in pyTermTk_ (`tryItOnline `_): .. code:: python @@ -42,7 +43,8 @@ The above code produces the following output Example 2 - Your first Window ----------------------------- -Following is the code to execute `helloworld.002.py `_ in pyTermTk_: +Following is the code to execute `helloworld.002.py `_ +in pyTermTk_ (`tryItOnline `_): .. code:: python diff --git a/tutorial/002-layout.rst b/tutorial/002-layout.rst index a7a4d0a0..f13afb62 100644 --- a/tutorial/002-layout.rst +++ b/tutorial/002-layout.rst @@ -14,6 +14,13 @@ .. _Nested Layouts Example: https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/layout/example5.nested.layouts.py .. _`row/colspan Example`: https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/layout/example6.grid.span.py +.. _web-LayoutEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example1.simple.layout.py +.. _web-VBoxEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example2.simple.vbox.py +.. _web-HBoxEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example3.simple.hbox.py +.. _web-GridEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example4.simple.grid.py +.. _web-NestedEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example5.nested.layouts.py +.. _web-SpanEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example6.grid.span.py + ============================================================================= pyTermTk_ - Layouts ============================================================================= @@ -111,7 +118,7 @@ Examples 1 - Simple TTkLayout_ --------------------- -Following is the code to execute `Layout Example`_ in pyTermTk_ +Following is the code to execute `Layout Example`_ in pyTermTk_ (`tryItOnline `_) .. code:: python @@ -146,7 +153,7 @@ The above code produces the following output: 2 - Simple TTkVBoxLayout_ ------------------------- -Following is the code to execute `VBox Example`_ in pyTermTk_ +Following is the code to execute `VBox Example`_ in pyTermTk_ (`tryItOnline `_) .. code:: python @@ -192,7 +199,7 @@ The above code produces the following output: 3 - Simple TTkHBoxLayout_ ------------------------- -Following is the code to execute `HBox Example`_ in pyTermTk_ +Following is the code to execute `HBox Example`_ in pyTermTk_ (`tryItOnline `_) .. code:: python @@ -239,7 +246,7 @@ The above code produces the following output 4 - Simple TTkGridLayout_ ------------------------- -Following is the code to execute `HBox Example`_ in pyTermTk_ +Following is the code to execute `Grid Example`_ in pyTermTk_ (`tryItOnline `_) .. code:: python @@ -284,7 +291,7 @@ The above code produces the following output 5 - Nested Layouts ------------------ -Following is the code to execute `Nested Layouts Example`_ in pyTermTk_ +Following is the code to execute `Nested Layouts Example`_ in pyTermTk_ (`tryItOnline `_) .. code:: python @@ -339,7 +346,7 @@ The above code produces the following output 6 - Rowspan/Colspan in Grid Layout ---------------------------------- -Following is the code to execute `row/colspan Example`_ in pyTermTk_ +Following is the code to execute `row/colspan Example`_ in pyTermTk_ (`tryItOnline `_) .. code:: python diff --git a/tutorial/003-signalslots.rst b/tutorial/003-signalslots.rst index e0edb704..8ccf71b0 100644 --- a/tutorial/003-signalslots.rst +++ b/tutorial/003-signalslots.rst @@ -53,6 +53,7 @@ Example 1 - basic signal slots ------------------------------ From `example1.basic.signalslots.py `_ +(`tryItOnline `_): .. code:: python @@ -107,6 +108,7 @@ Example 2 - Use widgets signals and slots ----------------------------------------- From `example2.widgets.signalslots.py `_ +(`tryItOnline `_): .. code:: python diff --git a/tutorial/004-logging.rst b/tutorial/004-logging.rst index d25cd8ef..7185e9c2 100644 --- a/tutorial/004-logging.rst +++ b/tutorial/004-logging.rst @@ -20,6 +20,7 @@ Example 1 - Log to file ----------------------- From `example1.logtofile.py `_ +(`tryItOnline `_): .. code:: python @@ -40,6 +41,7 @@ Example 2 - Log to stdout ------------------------- From `example2.logtostdout.py `_ +(`tryItOnline `_): .. code:: python @@ -59,6 +61,7 @@ Example 3 - custom logging -------------------------- From `example3.customlogging.py `_ +(`tryItOnline `_): .. code:: python @@ -89,6 +92,7 @@ Example 4 - Use TTkLogViewer_ widget -------------------------------------------------- From `example4.ttklogviewer.py `_ +(`tryItOnline `_): .. code:: python diff --git a/tutorial/005-calculator.rst b/tutorial/005-calculator.rst index c35b9bd0..525f2a03 100644 --- a/tutorial/005-calculator.rst +++ b/tutorial/005-calculator.rst @@ -53,6 +53,7 @@ Initialize the window --------------------- From `calculator.001.py `_ +(`tryItOnline `_): .. code:: bash @@ -82,6 +83,7 @@ Add all the widgets of calculator to it --------------------------------------- From `calculator.002.py `_ +(`tryItOnline `_): Based on the positions and sizes defined in the `design layout <#design>`_, I place all the widgets on the TTkGridLayout_ (**winLayout**) @@ -163,6 +165,7 @@ Numeric Button Events --------------------------------------- From `calculator.003.py `_ +(`tryItOnline `_): .. code:: bash @@ -209,6 +212,7 @@ Operation and results events ---------------------------- From `calculator.004.py `_ +(`tryItOnline `_): .. code:: bash @@ -252,6 +256,7 @@ Beware the Mystery Button ----------------------------------------- From `calculator.005.py `_ +(`tryItOnline `_): .. code:: bash diff --git a/tutorial/ttkDesigner/textEdit/README.rst b/tutorial/ttkDesigner/textEdit/README.rst index 5ad085f1..826834e0 100644 --- a/tutorial/ttkDesigner/textEdit/README.rst +++ b/tutorial/ttkDesigner/textEdit/README.rst @@ -166,7 +166,7 @@ Preview and Quick Export controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" > Exported: `texteditor.01.py `_ -(`Try Online `__) +(`tryItOnline `_): .. code:: bash @@ -187,7 +187,7 @@ Option 1) Include the Open/Save routine and link them to the widget Once (quick)exported the code, we need to define the appropriate routines and link them to the file(open/save) pickers `signals `__ `texteditor.02.py `_ -(`Try Online `__) +(`tryItOnline `_): .. code:: bash @@ -228,7 +228,7 @@ Option 2) Extend a custom widget including the open/save methods ---------------------------------------------------------------- `texteditor.03.py `_ -(`Try Online `__) +(`tryItOnline `_): .. code:: bash