11 changed files with 679 additions and 0 deletions
@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env python3 |
||||
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2023 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the"Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
import os |
||||
import pty |
||||
import sys |
||||
import threading |
||||
import argparse |
||||
from select import select |
||||
|
||||
sys.path.append(os.path.join(sys.path[0],'..')) |
||||
import TermTk as ttk |
||||
|
||||
parser = argparse.ArgumentParser() |
||||
parser.add_argument('-d', help='Debug (Add LogViewer Panel)', action='store_true') |
||||
args = parser.parse_args() |
||||
|
||||
# ttk.TTkLog.use_default_file_logging() |
||||
root = ttk.TTk(layout=ttk.TTkGridLayout()) |
||||
|
||||
split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL) |
||||
|
||||
split.addItem(top := ttk.TTkLayout()) |
||||
|
||||
if args.d: |
||||
split.addWidget(ttk.TTkLogViewer(follow=False ), title='Log', size=20) |
||||
|
||||
quitBtn = ttk.TTkButton(text="QUIT", border=True) |
||||
quitBtn.clicked.connect(ttk.TTkHelper.quit) |
||||
|
||||
cb_c = ttk.TTkCheckbox(pos=(0,3),size=(20,1), text="CTRL-C (VINTR) ", checked=ttk.TTkK.Checked) |
||||
cb_s = ttk.TTkCheckbox(pos=(0,4),size=(20,1), text="CTRL-S (VSTOP) ", checked=ttk.TTkK.Checked) |
||||
cb_z = ttk.TTkCheckbox(pos=(0,5),size=(20,1), text="CTRL-Z (VSUSP) ", checked=ttk.TTkK.Checked) |
||||
cb_q = ttk.TTkCheckbox(pos=(0,6),size=(20,1), text="CTRL-Q (VSTART)", checked=ttk.TTkK.Checked) |
||||
|
||||
cb_c.stateChanged.connect(lambda x: ttk.TTkTerm.setSigmask(ttk.TTkTerm.Sigmask.CTRL_C,x==ttk.TTkK.Checked)) |
||||
cb_s.stateChanged.connect(lambda x: ttk.TTkTerm.setSigmask(ttk.TTkTerm.Sigmask.CTRL_S,x==ttk.TTkK.Checked)) |
||||
cb_z.stateChanged.connect(lambda x: ttk.TTkTerm.setSigmask(ttk.TTkTerm.Sigmask.CTRL_Z,x==ttk.TTkK.Checked)) |
||||
cb_q.stateChanged.connect(lambda x: ttk.TTkTerm.setSigmask(ttk.TTkTerm.Sigmask.CTRL_Q,x==ttk.TTkK.Checked)) |
||||
|
||||
win1 = ttk.TTkWindow(pos=(90,5), size=(70,15), title="Terminallo n.1", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint) |
||||
term1 = ttk.TTkTerminal(parent=win1) |
||||
term1.runShell() |
||||
|
||||
win2 = ttk.TTkWindow(pos=(0,0), size=(150,30), title="Terminallo n.2", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint) |
||||
term2 = ttk.TTkTerminal(parent=win2) |
||||
term2.runShell() |
||||
|
||||
win3 = ttk.TTkWindow(pos=(92,8), size=(70,15), title="Terminallo n.3", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint) |
||||
term3 = ttk.TTkTerminal(parent=win3) |
||||
term3.runShell() |
||||
|
||||
win4 = ttk.TTkWindow(pos=(94,11), size=(70,15), title="Terminallo n.4", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint) |
||||
term4 = ttk.TTkTerminal(parent=win4) |
||||
term4.runShell() |
||||
|
||||
top.addWidgets([quitBtn, cb_c, cb_s, cb_z, cb_q, win1, win2, win3, win4]) |
||||
|
||||
term2.setFocus() |
||||
|
||||
root.mainloop() |
||||
@ -0,0 +1,53 @@
|
||||
|
||||
|
||||
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄🬿 |
||||
█ █ ▄▄▄▄ █ 🭢🭕🭏🬼 |
||||
█ █ █ █ █ 🭥🭌 |
||||
█ █ █▄▄█ █ █ |
||||
█ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █ |
||||
█ █ |
||||
█ █ |
||||
█ █ |
||||
█ █ |
||||
█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ █ |
||||
█ █ █ █ |
||||
█ █ █ █ |
||||
█ █ █ █ |
||||
█ █ █ █ |
||||
█ █ █ █ |
||||
█ █ █ █ |
||||
█ █ █ █ |
||||
█▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▄▄▄▄█ |
||||
|
||||
🭖🭏🭡 🭖🭩🭡 🭇▖ ▖▖ |
||||
🭤🭓🭛 🭦█🭛 ▌● ▞▖ |
||||
|
||||
🭇🬼 |
||||
🭃🭌 ▄🬿 |
||||
🭥🭒█ 🭢🭕🭏🬼 |
||||
🭋🭍🭑🬽🭢🭕 🭥🭌 🬿 |
||||
🭅███🭀 🭥🭒🭒█🭏🬼 🭒 |
||||
🭋██🭥██🭐 🭢🭕█🭌🬿 |
||||
|
||||
|
||||
🭇🬼 🭇 __X__ 🬼 🬼 X |
||||
🭃🭌🬿 🭃 🭌🬿 🭌 🬿 X |
||||
🭥🭒█🭏🬼 🭥🭒 🭏🬼 🭏 🬼 X |
||||
🭋🭍🭑🬽🭢🭕█🭌🬿 🭋🭍🭑🬽 🭢🭕 🭌🬿 🭌 🬿 X |
||||
🭅███🭀 🭥🭒█🭏🬼 🭅███🭀 🭥🭒 🭏🬼 🭏 🬼 X |
||||
🭋████🭐 🭢🭕█🭌🬿 🭋████🭐 🭢🭕 🭌🬿 🭌 🬿 X |
||||
|
||||
|
||||
|
||||
🬼 🭇 🭗 🭢 |
||||
🬽 🭈 🭘 🭣 |
||||
🬾 🭉 🭙 🭤 |
||||
🬿 🭊 🭚 🭥 |
||||
🭀 🭋 🭛 🭦 |
||||
🭌 🭁 🭝 🭒 |
||||
🭍 🭂 🭞 🭓 |
||||
🭎 🭃 🭟 🭔 |
||||
🭏 🭄 🭠 🭕 |
||||
🭐 🭅 🭡 🭖 |
||||
🭑 🭆 🭜 🭧 |
||||
|
||||
@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env python3 |
||||
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2023 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the"Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
import os |
||||
import pty |
||||
import sys |
||||
import threading |
||||
import argparse |
||||
from select import select |
||||
|
||||
|
||||
sys.path.append(os.path.join(sys.path[0],'../..')) |
||||
import TermTk as ttk |
||||
|
||||
from TermTk.TTkCore.canvas import TTkCanvas |
||||
|
||||
from wblib import * |
||||
|
||||
# parser = argparse.ArgumentParser() |
||||
# parser.add_argument('-d', help='Debug (Add LogViewer Panel)', action='store_true') |
||||
# args = parser.parse_args() |
||||
|
||||
# class WBWindow(ttk.TTkWindow): |
||||
|
||||
class WorkBench(ttk.TTkWidget): |
||||
def __init__(self, *args, **kwargs): |
||||
super().__init__(*args, **kwargs) |
||||
self.setPadding(1,0,0,0) |
||||
def paintEvent(self, canvas: TTkCanvas): |
||||
w,h = self.size() |
||||
canvas.fill(color=bgBLUE) |
||||
# draw the title |
||||
canvas.drawText( |
||||
text=" pyTermTk Workbench. Version 1.0 plenty of free memory", |
||||
width=w, |
||||
color=bgWHITE+fgBLUE) |
||||
|
||||
canvas.drawText( |
||||
text="│◪│◩│", |
||||
pos=(w-5,0), |
||||
color=bgWHITE+fgBLUE) |
||||
|
||||
class TTkWorkbench(ttk.TTk): |
||||
def paintEvent(self, canvas: TTkCanvas): |
||||
canvas.fill(color=bgBLUE) |
||||
|
||||
root = TTkWorkbench(layout=ttk.TTkGridLayout()) |
||||
root.setPadding(3,3,15,10) |
||||
|
||||
wbl = WBLoader(size=root.size()) |
||||
root.rootLayout().addWidget(wbl) |
||||
|
||||
wb = WorkBench(parent=root) |
||||
|
||||
win2 = WBWindow(parent=wb, pos=(5,2), size=(50,15), title="euWorkbench",) |
||||
|
||||
|
||||
win3 = WBWindow(parent=wb, pos=(15,10), size=(70,25), |
||||
wbbg=bgBLACK+fgWHITE, |
||||
title="Terminallo n.1",layout=ttk.TTkVBoxLayout()) |
||||
term3 = ttk.TTkTerminal(parent=win3) |
||||
term3.runShell() |
||||
|
||||
win1 = WBWindow(parent=wb, pos=(10,5), size=(60,20), |
||||
wbbg=bgBLACK+fgWHITE, |
||||
title="Terminallo n.1",layout=ttk.TTkVBoxLayout()) |
||||
term1 = ttk.TTkTerminal(parent=win1) |
||||
term1.runShell() |
||||
|
||||
|
||||
root.mainloop() |
||||
@ -0,0 +1,5 @@
|
||||
from .colors import * |
||||
from .window import * |
||||
from .scrollbar import * |
||||
from .iconbutton import * |
||||
from .loader import * |
||||
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3 |
||||
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2023 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the"Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
sys.path.append(os.path.join(sys.path[0],'../..')) |
||||
import TermTk as ttk |
||||
|
||||
# Colors: |
||||
# Blue: 0055aa |
||||
# Orange: ff8800 |
||||
|
||||
__all__ = [ |
||||
'fgBLUE','fgORANGE','fgBLACK','fgWHITE', |
||||
'bgBLUE','bgORANGE','bgBLACK','bgWHITE'] |
||||
|
||||
fgBLUE = ttk.TTkColor.fg('#0055aa') |
||||
fgORANGE = ttk.TTkColor.fg('#0055aa') |
||||
fgBLACK = ttk.TTkColor.fg('#000000') |
||||
fgWHITE = ttk.TTkColor.fg('#ffffff') |
||||
bgBLUE = ttk.TTkColor.bg('#0055aa') |
||||
bgORANGE = ttk.TTkColor.bg('#0055aa') |
||||
bgBLACK = ttk.TTkColor.bg('#000000') |
||||
bgWHITE = ttk.TTkColor.bg('#ffffff') |
||||
@ -0,0 +1,45 @@
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the "Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
from TermTk.TTkCore.constant import TTkK |
||||
from TermTk.TTkCore.signal import pyTTkSlot, pyTTkSignal |
||||
from TermTk.TTkCore.color import TTkColor |
||||
from TermTk.TTkCore.canvas import TTkCanvas |
||||
from TermTk.TTkWidgets.widget import TTkWidget |
||||
from TermTk.TTkWidgets.scrollbar import TTkScrollBar |
||||
|
||||
from .colors import * |
||||
|
||||
__all__ = ['WBIconButton'] |
||||
|
||||
class WBIconButton(TTkWidget): |
||||
__slots__ = ('_text') |
||||
def __init__(self, text="", **kwargs): |
||||
self._text = text |
||||
super().__init__(**kwargs) |
||||
self.getCanvas().setTransparent(True) |
||||
self.resize(len(text),3) |
||||
|
||||
def paintEvent(self, canvas: TTkCanvas): |
||||
canvas.drawText(text="-----", pos=(0,0)) |
||||
canvas.drawText(text="-----", pos=(0,1)) |
||||
canvas.drawText(text=self._text, pos=(0,2)) |
||||
@ -0,0 +1,112 @@
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the "Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
from TermTk import TTkUtil, TTkWidget, TTkLabel, TTkCanvas |
||||
|
||||
from .colors import * |
||||
|
||||
__all__ = ['WBLoader'] |
||||
|
||||
class WBLoader(TTkWidget): |
||||
def __init__(self, *args, **kwargs): |
||||
super().__init__(*args, **kwargs) |
||||
|
||||
# ANSII dumb.image.tool.py |
||||
data = TTkUtil.base64_deflate_2_obj( |
||||
"eJzlXE2OJbcNziKrXMEbnyAoVZX+UOvscoAAPsPcwYsB4oUBexHP2HHsQQIkQID4BgFyF5/ARwg/UlKpSPZ73e4ex0ZmRk/T3exXVRL58eOP3se//uL3H/2K//zhd/Sf" + |
||||
"Dz5aXtE4tnKsxxq3MXb1jVcfmj/qd8/Rfjf08er7N19fhfd9DBHeUh9WWN/Vgr8k9vFP9u9yP3x5uz7fv3n9w7t//UeW5Tc/cl0fu0rRWdKtCff133YI0lhJ+C/3NmuM" + |
||||
"V3pfb967kh1b3mT33Afdw6dX4W0bQ4SXMYzwtOay+9cLh7DRoGdd2kpN33jlL+69dyyZxs7zrr7x6sEdM7/lquoTLvSyi/DQu10Ef3j33d9ofPGwzp+qQnKfkdL/+xkq" + |
||||
"r3SijCG/tW59GI0PKdCgOdb2GEuix0hHW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idA0E6KEP5sKR3nSG12fBUveSbpuU5UMDvc" + |
||||
"sDc8TAnJ2BKSqn8YGZE4N29HcWLR4iqZC9zJPpZsyrvoElIRHG03i8REPJwsKxLAZXzGDGKQ1T1XU9MYTa2CqJWTyLEV4tiHFbZwM5jdq96Z9PpWhD/XzH94990bGv+k" + |
||||
"8Vd8ctAf0QOJRkiebcbgmUeYnoB+TwK08bNJLWU4wuNnrlMyOnwtNF1SoxrQxs86Ro30pwM7eyvojGB7a9RvMyCMIzlgc6HHBCnwsV/bmoRgcB9nKhD5k67aT/HDIVE2" + |
||||
"rw4QgzFa2FFB+YNtu3gS8NzxQKNRyUkF6tNOHJzuLRdoexHANqdehJWrQf5pp9LOOA4ul7mOXe3nVnDqYpk7dDZJMjoltl14aVewsAZZLyd/rDpKa+b1sq0eqouMPyQh" + |
||||
"2f5yWm80RPfDFwjYpdVWtVuh4TUvE4fESoR+TF6fADZJstmpK+HbPTda+GmHFC6wdEoSEv3j+zef0PQ10OjT799+RtO3LwRKz4Glp0TRlsGN8Zgo+hbP0o0/l1SkRppN" + |
||||
"PmOgdFgCweAoy+lmOZOJg+RsjeToTwMpLefXTwgEbkQMjmQLXnvMwFHcUR3JKB+YMjhO3VnSYW248rZP3dhRemmiswCI/VDAGc1EOLe6+OE7H4FaudmkEZHEIOF9YoxO" + |
||||
"6BRGSodjmgRv5h6h7HwYjO4/SNzM5Ky/+WyAwofNiveesfHqkWXInDCVJLD+nAsd4F24iLb2m+bwZGi4U674UR/G9hOZuqErc+P56zvvfDNhplNxl3j0rvAlu/aIO5k3" + |
||||
"+5lvbuVvvLm9kxuPaYD11gLac/Mj/H3EO9/o+nqeQotm/um3/wW9x45d") |
||||
|
||||
w,h = self.size() |
||||
l = TTkLabel(parent=self, text=data) |
||||
lw,lh = l.size() |
||||
l.move((w-lw)//2,(h-lh)//2) |
||||
|
||||
# |
||||
# ▀▄ █ ██ █ ▖ █ █ ▝▀▀▄ ██ |
||||
# ▗▛█ ██ █ █ █ ▗▄█ █▀▀█ ██ |
||||
# ▝▘ █ ██ ▝▀▝▀▀ ▀▀ ▀ ▀▀ ██ |
||||
# ██ ██ |
||||
# ████████ ████████ |
||||
# |
||||
# |
||||
# ████████╗ ████████╗ |
||||
# ╚══██╔══╝ ╚══██╔══╝ |
||||
# ██║ ▄▄ ▄ ▄▄ ▄▄▖▄▖ ██║ █ ▗▖ |
||||
# ▞▀▚ ▖▗ ██║ █▄▄█ █▀▘ █ █ █ ██║ █▟▘ |
||||
# ▙▄▞▐▄▟ ██║ ▀▄▄▖ █ █ ▝ █ ██║ █ ▀▄ |
||||
# ▌ ▐ ╚═╝ ╚═╝ |
||||
# ▚▄▄▘ |
||||
|
||||
def mouseReleaseEvent(self, evt) -> bool: |
||||
self.close() |
||||
return True |
||||
|
||||
def paintEvent(self, canvas: TTkCanvas): |
||||
canvas.fill(color=bgWHITE) |
||||
@ -0,0 +1,44 @@
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the "Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
from TermTk.TTkCore.constant import TTkK |
||||
from TermTk.TTkCore.signal import pyTTkSlot, pyTTkSignal |
||||
from TermTk.TTkCore.color import TTkColor |
||||
from TermTk.TTkCore.canvas import TTkCanvas |
||||
from TermTk.TTkWidgets.widget import TTkWidget |
||||
from TermTk.TTkWidgets.scrollbar import TTkScrollBar |
||||
|
||||
import wblib.theme as draw_custom |
||||
from TermTk.TTkTheme.theme import TTkTheme |
||||
|
||||
from .colors import * |
||||
|
||||
__all__ = ['WBScrollBar'] |
||||
|
||||
CUSTOM_THEME = TTkTheme.NERD | {'draw':draw_custom} |
||||
|
||||
TTkTheme.loadTheme( CUSTOM_THEME ) |
||||
|
||||
class WBScrollBar(TTkScrollBar): |
||||
def __init__(self, *args, **kwargs): |
||||
super().__init__(*args, **kwargs) |
||||
self._color = self._focusColor = fgBLUE+bgWHITE |
||||
@ -0,0 +1,32 @@
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the "Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
|
||||
from TermTk.TTkTheme.theme import TTkTheme |
||||
|
||||
class TTkTheme(TTkTheme.NERD['draw'].TTkTheme): |
||||
# hscroll = ('←','┄','▓','→') |
||||
# vscroll = ('↑','┊','▓','↓') |
||||
# hscroll = ('<','┄','░','>') |
||||
# vscroll = ('∆','┊','░','∇') |
||||
hscroll = ('<','┄','⣿','>') |
||||
vscroll = ('∆','┊','⣿','∇') |
||||
@ -0,0 +1,146 @@
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the "Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
from TermTk.TTkCore.cfg import TTkCfg |
||||
from TermTk.TTkCore.constant import TTkK |
||||
from TermTk.TTkCore.color import TTkColor |
||||
from TermTk.TTkCore.canvas import TTkCanvas |
||||
from TermTk.TTkLayouts import TTkGridLayout, TTkLayout |
||||
from TermTk.TTkWidgets.button import TTkButton |
||||
from TermTk.TTkWidgets.resizableframe import TTkResizableFrame |
||||
|
||||
from .colors import * |
||||
from .scrollbar import * |
||||
|
||||
__all__ = ['WBWindow'] |
||||
|
||||
|
||||
class _MinimizedButton(TTkButton): |
||||
__slots__ = ('_windowWidget') |
||||
def __init__(self, *args, **kwargs): |
||||
super().__init__(*args, **kwargs) |
||||
self._windowWidget = kwargs.get('windowWidget') |
||||
def _cb(): |
||||
self._windowWidget.show() |
||||
self.close() |
||||
self.clicked.connect(_cb) |
||||
|
||||
class WBWindow(TTkResizableFrame): |
||||
'''TTkWindow''' |
||||
__slots__ = ( |
||||
'_title', '_mouseDelta', '_draggable', |
||||
'_btnClose', '_btnMax', '_btnMin', '_btnReduce', |
||||
'_flags', '_winTopLayout', |
||||
'_sbRight', '_sbBottom', |
||||
'_maxBk', '_redBk', |
||||
'_wbbg') |
||||
def __init__(self, wbbg=fgWHITE+bgBLUE, *args, **kwargs): |
||||
self._winTopLayout = TTkGridLayout() |
||||
self._wbbg = wbbg |
||||
super().__init__(*args, **kwargs) |
||||
self._flags = TTkK.NONE |
||||
self.setPadding(1,1,1,1) |
||||
self._mouseDelta = (0,0) |
||||
self.setFocusPolicy(TTkK.ClickFocus) |
||||
self._draggable = False |
||||
self._sbRight = WBScrollBar(orientation=TTkK.VERTICAL) |
||||
self._sbBottom = WBScrollBar(orientation=TTkK.HORIZONTAL) |
||||
self._sbRight.setPageStep(60) |
||||
self._sbRight.setRange(0, 100) |
||||
self._sbBottom.setPageStep(60) |
||||
self._sbBottom.setRange(0, 100) |
||||
self.rootLayout().addWidgets([self._sbRight,self._sbBottom]) |
||||
w,h = self.size() |
||||
self._sbRight.setGeometry( w-1, 1, 1, h-2) |
||||
self._sbBottom.setGeometry( 0 , h-1, w-1, 1 ) |
||||
|
||||
def resizeEvent(self, w, h): |
||||
self._maxBk = None |
||||
self._redBk = None |
||||
self._winTopLayout.setGeometry(1,1,w-2,1) |
||||
self._sbRight.setGeometry( w-1, 1, 1, h-2) |
||||
self._sbBottom.setGeometry( 0 , h-1, w-1, 1 ) |
||||
super().resizeEvent(w,h) |
||||
|
||||
def mousePressEvent(self, evt): |
||||
self._mouseDelta = (evt.x, evt.y) |
||||
self._draggable = False |
||||
w,_ = self.size() |
||||
x,y = evt.x, evt.y |
||||
# If the mouse position is inside the header box enable the dragging feature |
||||
if y==0 and 1<=x<w-1: |
||||
if x<4: |
||||
self.close() |
||||
return True |
||||
if x>w-4: |
||||
self.lowerWidget() |
||||
return True |
||||
self._draggable = True |
||||
return True |
||||
return TTkResizableFrame.mousePressEvent(self, evt) |
||||
|
||||
def mouseDragEvent(self, evt): |
||||
if self._draggable: |
||||
x,y = self.pos() |
||||
dx = evt.x-self._mouseDelta[0] |
||||
dy = evt.y-self._mouseDelta[1] |
||||
self.move(x+dx, y+dy) |
||||
return True |
||||
return TTkResizableFrame.mouseDragEvent(self, evt) |
||||
|
||||
def focusInEvent(self): |
||||
if self._menubarTop: |
||||
self._menubarTop.setBorderColor(TTkColor.fg("#ffff55")) |
||||
self.update() |
||||
|
||||
def focusOutEvent(self): |
||||
self._draggable = False |
||||
if self._menubarTop: |
||||
self._menubarTop.setBorderColor(TTkColor.RST) |
||||
self.update() |
||||
|
||||
def paintEvent(self, canvas=TTkCanvas): |
||||
if self.hasFocus(): |
||||
color = TTkCfg.theme.windowBorderColorFocus |
||||
titleChar = '☰' |
||||
else: |
||||
color = TTkCfg.theme.windowBorderColor |
||||
# titleChar = '☷' |
||||
titleChar = '⚏' |
||||
|
||||
w,h = self.size() |
||||
|
||||
|
||||
canvas.fill(color=bgBLUE) |
||||
canvas.fill(char='▎',pos=(0,1), size=(1,h-2), color=self._wbbg) |
||||
# draw the title ┃ │ |
||||
canvas.drawText( |
||||
text=f"│▣│ {self._title} {titleChar*w}", |
||||
# text=f"│⚀│ {self._title} {titleChar*w}", |
||||
color=bgWHITE+fgBLUE) |
||||
|
||||
canvas.drawText( |
||||
text="│◪│◩│", |
||||
pos=(w-5,0), |
||||
color=bgWHITE+fgBLUE) |
||||
|
||||
canvas.drawChar(pos=(w-1,h-1),char='⇱',color=fgBLUE+bgWHITE) |
||||
Loading…
Reference in new issue