Skip to content

Commit

Permalink
Improved docs and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ceccopierangiolieugenio committed Feb 22, 2024
1 parent 5de3c9d commit d122b8f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
5 changes: 4 additions & 1 deletion demo/showcase/apptemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 3 additions & 0 deletions docs/source/info/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
47 changes: 39 additions & 8 deletions docs/source/info/resources/clipboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d122b8f

Please sign in to comment.