Browse Source

Added GPM to the docs

pull/296/head
Eugenio Parodi 🌶️ 1 year ago
parent
commit
619b494cc3
  1. 8
      docs/source/info/resources/clipboard.rst
  2. 77
      docs/source/info/resources/experimental.rst
  3. 1
      docs/source/info/resources/index.rst
  4. 3329
      tests/utf-8/ascii.test.txt
  5. 36
      tutorial/000-examples.rst

8
docs/source/info/resources/clipboard.rst

@ -9,10 +9,10 @@ Clipboard
pyTermTk_ include a clipboard wrapper :py:class:`TTkClipboard`, around any of the following libraries:
- `copykitten <https://github.com/klavionik/copykitten>`_ - Robust, dependency-free way to use the system clipboard in Python.
- `pyperclip <https://github.com/asweigart/pyperclip>`_ - Python module for cross-platform clipboard functions.
- `pyperclip3 <https://pypi.org/project/pyperclip3>`_ / `pyclip <https://github.com/spyoungtech/pyclip>`_ - Cross-platform Clipboard module for Python with binary support.
- `clipboard <https://github.com/terryyin/clipboard>`_ - A cross platform clipboard operation library of Python. Works for Windows, Mac and Linux.
- `copykitten <https://github.com/klavionik/copykitten>`__ - Robust, dependency-free way to use the system clipboard in Python.
- `pyperclip <https://github.com/asweigart/pyperclip>`__ - Python module for cross-platform clipboard functions.
- `pyperclip3 <https://pypi.org/project/pyperclip3>`__ / `pyclip <https://github.com/spyoungtech/pyclip>`_ - Cross-platform Clipboard module for Python with binary support.
- `clipboard <https://github.com/terryyin/clipboard>`__ - A cross platform clipboard operation library of Python. Works for Windows, Mac and Linux.
.. raw:: html

77
docs/source/info/resources/experimental.rst

@ -0,0 +1,77 @@
.. _experimental_features:
=====================
Experimental Features
=====================
PyTermTk provides several experimental features to enhance functionality and user interaction.
These features are not enabled by default and must be activated via environment variables.
Below is a list of the currently available experimental features.
.. _mouse_visual_feedback:
---------------------
Mouse Visual Feedback
---------------------
Enable mouse visual feedback glyph ('✠') in PyTermTk.
To enable this feature,
set the environment variable **TERMTK_MOUSE** to `1` and run your application:
.. code:: bash
TERMTK_MOUSE=1 demo/demo.py
----------------------------------------------------------------------------
`GPM <https://wiki.archlinux.org/title/General_purpose_mouse>`__ Integration
----------------------------------------------------------------------------
`GPM <https://wiki.archlinux.org/title/General_purpose_mouse>`__ (General Purpose Mouse) support enables mouse interaction in Linux TTY environments without requiring a graphical user interface.
To activate GPM support, set the **TERMTK_GPM** environment variable to `1`:
.. code:: bash
TERMTK_GPM=1 demo/demo.py
.. note::
The :ref:`mouse_visual_feedback` is enabled my default when the GPM driver is loaded
.. note::
GPM must be installed and running on your system for this feature to work.
Install GPM using your system's package manager and ensure it is started with
.. code:: bash
sudo systemctl start gpm
.. seealso::
* https://github.com/telmich/gpm
* https://wiki.archlinux.org/title/General_purpose_mouse
* https://www.geeksforgeeks.org/gpm-command-in-linux-with-examples
--------------
Serial Console
--------------
PyTermTk can detect the terminal size also on a serial console (i.e. ttyUSBx).
To force serial console compatibility,
set the **TERMTK_FORCESERIAL** environment variable to `1`:
.. code:: bash
TERMTK_FORCESERIAL=1 demo/demo.py
--------------------
Feedback and Support
--------------------
Since these features are experimental,
they may not work as expected in all environments.
If you encounter issues or have suggestions,
please report them to the PyTermTk issue tracker or contribute to the project.

1
docs/source/info/resources/index.rst

@ -9,3 +9,4 @@ Resources
clipboard
modal
dragdrop
experimental

3329
tests/utf-8/ascii.test.txt

File diff suppressed because it is too large Load Diff

36
tutorial/000-examples.rst

@ -11,7 +11,7 @@ TTkLineEdit
Init
----
`TTkLineEdit/Init.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkLineEdit/Init.01.py>`_ -
`TTkLineEdit/Init.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkLineEdit/Init.01.py>`__ -
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkLineEdit/Init.01.py>`__):
.. code:: bash
@ -24,7 +24,7 @@ Init
Set/Get Text
------------
`TTkLineEdit/SetGet.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkLineEdit/SetGet.01.py>`_ -
`TTkLineEdit/SetGet.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkLineEdit/SetGet.01.py>`__ -
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkLineEdit/SetGet.01.py>`__):
.. code:: bash
@ -37,7 +37,7 @@ Set/Get Text
Events
------
`TTkLineEdit/SetGet.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkLineEdit/Events.01.py>`_ -
`TTkLineEdit/SetGet.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkLineEdit/Events.01.py>`__ -
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkLineEdit/Events.01.py>`__):
.. _Examples-Terminal:
@ -48,48 +48,48 @@ TTkTerminal
.. note::
This widget is available only on Linux/Mac
`TTkTerminal/TerminalTab.01.Basic.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.01.Basic.py>`_
`TTkTerminal/TerminalTab.01.Basic.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.01.Basic.py>`__
`TTkTerminal/TerminalTab.02.AddButton.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.02.AddButton.py>`_
`TTkTerminal/TerminalTab.02.AddButton.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.02.AddButton.py>`__
`TTkTerminal/TerminalTab.03.KodeTab.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.03.KodeTab.py>`_
`TTkTerminal/TerminalTab.03.KodeTab.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.03.KodeTab.py>`__
`TTkTerminal/TerminalTab.04.KodeTab.close.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.04.KodeTab.close.py>`_
`TTkTerminal/TerminalTab.04.KodeTab.close.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTerminal/TerminalTab.04.KodeTab.close.py>`__
TTkTable
========
`TTkTable/table.01.basic.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.01.basic.py>`_
`TTkTable/table.01.basic.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.01.basic.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.01.basic.py>`__):
`TTkTable/table.02.custom.model.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.02.custom.model.01.py>`_
`TTkTable/table.02.custom.model.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.02.custom.model.01.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.02.custom.model.01.py>`__):
`TTkTable/table.02.custom.model.02.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.02.custom.model.02.py>`_
`TTkTable/table.02.custom.model.02.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.02.custom.model.02.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.02.custom.model.02.py>`__):
`TTkTable/table.02.custom.model.03.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.02.custom.model.03.py>`_
`TTkTable/table.02.custom.model.03.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.02.custom.model.03.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.02.custom.model.03.py>`__):
`TTkTable/table.03.theming.color.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.color.01.py>`_
`TTkTable/table.03.theming.color.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.color.01.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.03.theming.color.01.py>`__):
`TTkTable/table.03.theming.color.02.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.color.02.py>`_
`TTkTable/table.03.theming.color.02.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.color.02.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.03.theming.color.02.py>`__):
`TTkTable/table.03.theming.color.03.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.color.03.py>`_
`TTkTable/table.03.theming.color.03.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.color.03.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.03.theming.color.03.py>`__):
`TTkTable/table.03.theming.headers.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.headers.01.py>`_
`TTkTable/table.03.theming.headers.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.headers.01.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.03.theming.headers.01.py>`__):
`TTkTable/table.03.theming.lines.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.lines.01.py>`_
`TTkTable/table.03.theming.lines.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.03.theming.lines.01.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.03.theming.lines.01.py>`__):
`TTkTable/table.04.methods.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.04.methods.py>`_
`TTkTable/table.04.methods.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.04.methods.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.04.methods.py>`__):
`TTkTable/table.05.events.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.05.events.py>`_
`TTkTable/table.05.events.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/examples/TTkTable/table.05.events.py>`__
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/examples/TTkTable/table.05.events.py>`__):
TTkTextEdit

Loading…
Cancel
Save