Browse Source

Improved docs and demo

pull/243/head
Eugenio Parodi 2 years ago
parent
commit
d122b8fd85
  1. 5
      demo/showcase/apptemplate.py
  2. 3
      docs/source/info/installing.rst
  3. 47
      docs/source/info/resources/clipboard.rst

5
demo/showcase/apptemplate.py

@ -99,7 +99,10 @@ def main():
rootAppTemplate = root
root.setLayout(ttk.TTkGridLayout())
else:
rootAppTemplate = ttk.TTkWindow(parent=root,pos = (0,0), size=(100,40), title="Test AppTemplate", border=True, layout=ttk.TTkGridLayout())
rootAppTemplate = ttk.TTkWindow(
parent=root,pos = (0,0), size=(100,40),
flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint | ttk.TTkK.WindowFlag.WindowCloseButtonHint,
title="Test AppTemplate", border=True, layout=ttk.TTkGridLayout())
demoAppTemplate(rootAppTemplate)
root.mainloop()

3
docs/source/info/installing.rst

@ -120,6 +120,7 @@ Showcase
* messagebox `messagebox.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/demo/showcase/messagebox.py>`_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=demo/showcase/messagebox.py>`_)
* splitter `splitter.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/demo/showcase/splitter.py>`_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=demo/showcase/splitter.py>`_)
* Windows `windowsflags.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/demo/showcase/windowsflags.py>`_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=demo/showcase/windowsflags.py>`_)
* AppTemplate `apptemplate.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/demo/showcase/apptemplate.py>`_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=demo/showcase/apptemplate.py>`_)
* Tooltip `test.ui.026.toolTip.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tests/t.ui/test.ui.026.toolTip.py>`_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?fileUri=https://raw.githubusercontent.com/ceccopierangiolieugenio/pyTermTk/main/tests/t.ui/test.ui.026.toolTip.py>`_)
.. code:: bash
@ -146,6 +147,8 @@ Showcase
python3 demo/showcase/splitter.py
# Demo - Windows
python3 demo/showcase/windowsflags.py
# Demo - AppTemplate
python3 demo/showcase/apptemplate.py
# Demo - Tooltip
python3 tests/t.ui/test.ui.026.toolTip.py

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

@ -48,15 +48,46 @@ Usage
Once initialized the clipboard manager, 2 apis are provided that can be used to access the clipboard (:class:`~TermTk.TTkGui.clipboard.TTkClipboard.setText`, :class:`~TermTk.TTkGui.clipboard.TTkClipboard.text`)
.. code:: python
.. code:: python
from TermTk import TTkClipboard
from TermTk import TTkClipboard
# Initialize the clipboard manager
clipboard = TTkClipboard()
# Initialize the clipboard manager
clipboard = TTkClipboard()
# Push some text to the clipboard
clipboard.setText("Example")
# Push some text to the clipboard
clipboard.setText("Example")
# Get the text from the clipboard
text = clipboard.text()
# Get the text from the clipboard
text = clipboard.text()
------------------
Clipboard over ssh
------------------
As reported in `234# <https://github.com/ceccopierangiolieugenio/pyTermTk/issues/234#issuecomment-1930919647>`_, it is possible to share the clipboard enabling the X11 forwarding.
Terminal (Linux,osx)
~~~~~~~~~~~~~~~~~~~~
You can forward X11 using `ssh <https://www.man7.org/linux/man-pages/man1/ssh.1.html>`_
.. code:: bash
# Enable X11 forwarding
ssh -X <IP>
or
.. code:: bash
# Enable trusted X11 forwarding
ssh -Y <IP>
putty
~~~~~
It is possible to forward X11 via putty through these settings
.. image:: https://github.com/ceccopierangiolieugenio/pyTermTk/assets/8876552/1b7fea21-74f2-4351-9a9c-548aaa1581ca

Loading…
Cancel
Save