Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/dumbPaintTool/dumbPaintTool/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def main():
root = ttk.TTk(
title="Dumb Paint Tool",
layout=ttk.TTkGridLayout(),
mouseTrack=True,
sigmask=(
ttk.TTkTerm.Sigmask.CTRL_C |
ttk.TTkTerm.Sigmask.CTRL_Q |
Expand Down
3 changes: 1 addition & 2 deletions apps/perspectivator/perspectivator.pil.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,7 @@ def main():

root = ttk.TTk(
layout=ttk.TTkGridLayout(),
title="Perspectivator",
mouseTrack=True)
title="Perspectivator")


if len(args.filename) == 1 and args.filename[0].endswith('.json'):
Expand Down
3 changes: 1 addition & 2 deletions apps/perspectivator/perspectivator.wand.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,7 @@ def main():

root = ttk.TTk(
layout=ttk.TTkGridLayout(),
title="TTkode",
mouseTrack=True)
title="TTkode")

perspectivator = Perspectivator()
controlPanel = ControlPanel()
Expand Down
1 change: 0 additions & 1 deletion apps/ttkDesigner/ttkDesigner/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def main():

root = TTk(
title="TTk Designer",
mouseTrack=True,
layout=TTkGridLayout(),
sigmask=(
TTkTerm.Sigmask.CTRL_C |
Expand Down
1 change: 0 additions & 1 deletion apps/ttkode/ttkode/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def main():

root = TTk( layout=ttkodeProxy.ttkode(),
title="TTkode",
mouseTrack=True,
sigmask=(
# TTkTerm.Sigmask.CTRL_C |
TTkTerm.Sigmask.CTRL_Q |
Expand Down
8 changes: 4 additions & 4 deletions demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ def _listCallback(label):

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', help='Full Screen (default)', action='store_true')
parser.add_argument('-w', help='Windowed', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen (default)", action='store_true')
parser.add_argument('-w', help="Windowed", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
windowed = args.w
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk Demo", mouseTrack=mouseTrack)
if windowed:
Expand Down
2 changes: 1 addition & 1 deletion demo/games/breakout/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def paintEvent(self, canvas: ttk.TTkCanvas):
canvas.drawText(
pos=(posx,posy),
text=ball)
root = ttk.TTk(title="breakout Demo", mouseTrack=True, layout=ttk.TTkGridLayout())
root = ttk.TTk(title="breakout Demo", layout=ttk.TTkGridLayout())

frame = ttk.TTkFrame(layout=ttk.TTkGridLayout(), title="BreakOuTTk")
breakout = BreakOutDisplay(parent=frame)
Expand Down
2 changes: 1 addition & 1 deletion demo/games/breakoutrl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def reParams(self):
self._breakout.setParams(newParams)


root = ttk.TTk(title="Breakout - The Roguelike", mouseTrack=True, layout=ttk.TTkGridLayout())
root = ttk.TTk(title="Breakout - The Roguelike", layout=ttk.TTkGridLayout())

frame = ttk.TTkFrame(layout=ttk.TTkGridLayout(), title="BreakOuTTk - The Roguelike")
breakout = BreakOutDisplay(parent=frame)
Expand Down
2 changes: 1 addition & 1 deletion demo/showcase/date_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def main():
parser.add_argument('-f', help='Full Screen', action='store_true')
args = parser.parse_args()

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()
if args.f:
root.setLayout(ttk.TTkGridLayout())
winColor1 = root
Expand Down
6 changes: 3 additions & 3 deletions demo/showcase/formwidgets02.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ def demoFormWidgets(root=None):

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', help='Full Screen', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()

mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk Form Demo", mouseTrack=mouseTrack)
if args.f:
Expand Down
8 changes: 4 additions & 4 deletions demo/showcase/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ def _delSelected():

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', help='Full Screen (default)', action='store_true')
parser.add_argument('-w', help='Windowed', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen (default)", action='store_true')
parser.add_argument('-w', help="Windowed", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
windowed = args.w
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk List Demo", mouseTrack=mouseTrack)
if windowed:
Expand Down
8 changes: 4 additions & 4 deletions demo/showcase/menubar.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ def demoMenuBar(root=None):

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', help='Full Screen (default)', action='store_true')
parser.add_argument('-w', help='Windowed', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen (default)", action='store_true')
parser.add_argument('-w', help="Windowed", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
windowed = args.w
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk MenuiBar Demo", mouseTrack=mouseTrack)
if windowed:
Expand Down
8 changes: 4 additions & 4 deletions demo/showcase/tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def demoTab(root=None, border=True):

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', help='Full Screen (default)', action='store_true')
parser.add_argument('-w', help='Windowed', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen (default)", action='store_true')
parser.add_argument('-w', help="Windowed", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
windowed = args.w
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk Tab Demo", mouseTrack=mouseTrack)
if windowed:
Expand Down
8 changes: 4 additions & 4 deletions demo/showcase/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def demoTTkTable(root= None):

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', help='Full Screen (default)', action='store_true')
parser.add_argument('-w', help='Windowed', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen (default)", action='store_true')
parser.add_argument('-w', help="Windowed", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
windowed = args.w
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk List Demo", mouseTrack=mouseTrack)
if windowed:
Expand Down
2 changes: 1 addition & 1 deletion demo/ttkode.01.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():

ttk.TTkTheme.loadTheme(ttk.TTkTheme.NERD)

root = ttk.TTk(title="ttkode", mouseTrack=True)
root = ttk.TTk(title="ttkode")
layout = ttk.TTkGridLayout()
if args.f:
root.setLayout(layout)
Expand Down
2 changes: 1 addition & 1 deletion demo/ttkode.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():

ttk.TTkTheme.loadTheme(ttk.TTkTheme.NERD)

root = ttk.TTk(title="ttkode", mouseTrack=True)
root = ttk.TTk(title="ttkode")
layout = ttk.TTkGridLayout()
if args.f:
root.setLayout(layout)
Expand Down
2 changes: 1 addition & 1 deletion libs/pyTermTk/TermTk/TTkCore/ttk.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class TTk(TTkContainer):
def __init__(self, *,
title:str='TermTk',
sigmask:TTkTerm.Sigmask=TTkTerm.Sigmask.NONE,
mouseTrack:bool=False,
mouseTrack:bool=True,
mouseCursor:bool=False,
**kwargs) -> None:
# If the "TERMTK_FILE_LOG" env variable is defined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TTkTableModelSQLite3(TTkAbstractTableModel):
filename='sqlite.database.db'
tablename='users'

root = ttk.TTk(mouseTrack=True, layout=ttk.TTkGridLayout())
root = ttk.TTk(layout=ttk.TTkGridLayout())

basicTableModel = ttk.TTkTableModelSQLite3(fileName=filename, table=tablename)
table = ttk.TTkTable(parent=root, tableModel=basicTableModel, sortingEnabled=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TTkTerminalHelper():

import TermTk as ttk

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()

win = ttk.TTkWindow(parent=root, title="Terminal", size=(80+2,24+4), layout=ttk.TTkGridLayout())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TTkTerminalView(TTkAbstractScrollView, _TTkTerminal_CSI_DEC):

import TermTk as ttk

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()

win = ttk.TTkWindow(parent=root, title="Terminal", size=(80+2,24+4), layout=ttk.TTkGridLayout())

Expand Down
2 changes: 1 addition & 1 deletion libs/pyTermTk/TermTk/TTkWidgets/datetime_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class TTkDate(TTkWidget):

import TermTk as ttk

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()

ttk.TTkDate(parent=root) # Defaults to the current date

Expand Down
2 changes: 1 addition & 1 deletion libs/pyTermTk/TermTk/TTkWidgets/datetime_date_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ class TTkDateForm(TTkContainer):

import TermTk as ttk

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()

ttk.TTkDateForm(parent=root) # Defaults to the current date

Expand Down
2 changes: 1 addition & 1 deletion libs/pyTermTk/TermTk/TTkWidgets/datetime_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TTkDateTime(TTkContainer):

import TermTk as ttk

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()

ttk.TTkDateTime(parent=root) # Defaults to the current datetime

Expand Down
2 changes: 1 addition & 1 deletion libs/pyTermTk/TermTk/TTkWidgets/datetime_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class TTkTime(TTkWidget):

import TermTk as ttk

root = ttk.TTk(mouseTrack=True)
root = ttk.TTk()

ttk.TTkTime(parent=root) # Defaults to the current time

Expand Down
2 changes: 1 addition & 1 deletion libs/pyTermTk/TermTk/TTkWidgets/listwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class TTkListWidget(TTkAbstractScrollView):

import TermTk as ttk

root = ttk.TTk(layout=ttk.TTkHBoxLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkHBoxLayout())

ttk.TTkList(parent=root, items=["Item 1","Item 2","Item 3"])
ttk.TTkList(parent=root, items=[f"Item 0x{i:03X}" for i in range(100)])
Expand Down
2 changes: 1 addition & 1 deletion multiplexers/workbench/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def paintEvent(self, canvas: TTkCanvas):
title=f"Key Press Viewer",layout=ttk.TTkVBoxLayout())
logWin.setViewport(_TTkLogViewer())

root = TTkWorkbench(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = TTkWorkbench(layout=ttk.TTkGridLayout())
root.setPadding(3,3,15,10)

wbl = WBLoader(size=root.size())
Expand Down
8 changes: 4 additions & 4 deletions tests/pytest/run_test_001_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ def loadQueue(self, fd):
parser = argparse.ArgumentParser()
parser.add_argument('-r', '--record', help='Record input to File', type=argparse.FileType('bw'))
parser.add_argument('-p', '--play', help='Play input from File', type=argparse.FileType('br'))
parser.add_argument('-f', help='Full Screen (default)', action='store_true')
parser.add_argument('-w', help='Windowed', action='store_true')
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-f', help="Full Screen (default)", action='store_true')
parser.add_argument('-w', help="Windowed", action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
mouseTrack = args.t
mouseTrack = not args.t

print(args)

Expand Down
2 changes: 1 addition & 1 deletion tests/t.pty/test.pty.006.terminal.03.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
args = parser.parse_args()

# ttk.TTkLog.use_default_file_logging()
root = ttk.TTk(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkGridLayout())

split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL)

Expand Down
2 changes: 1 addition & 1 deletion tests/t.pty/test.pty.006.terminal.04.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
args = parser.parse_args()

# ttk.TTkLog.use_default_file_logging()
root = ttk.TTk(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkGridLayout())

split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL)

Expand Down
2 changes: 1 addition & 1 deletion tests/t.pty/test.pty.006.terminal.05.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
args = parser.parse_args()

# ttk.TTkLog.use_default_file_logging()
root = ttk.TTk(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkGridLayout())

split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL)

Expand Down
2 changes: 1 addition & 1 deletion tests/t.pty/test.pty.006.terminal.06.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
args = parser.parse_args()

# ttk.TTkLog.use_default_file_logging()
root = ttk.TTk(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkGridLayout())

split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL)

Expand Down
2 changes: 1 addition & 1 deletion tests/t.pty/test.pty.006.terminal.07.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
args = parser.parse_args()

# ttk.TTkLog.use_default_file_logging()
root = ttk.TTk(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkGridLayout())

split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL)

Expand Down
2 changes: 1 addition & 1 deletion tests/t.pty/test.pty.006.terminal.08.getBuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
args = parser.parse_args()

# ttk.TTkLog.use_default_file_logging()
root = ttk.TTk(layout=ttk.TTkGridLayout(), mouseTrack=True)
root = ttk.TTk(layout=ttk.TTkGridLayout())

split = ttk.TTkSplitter(parent=root, orientation=ttk.TTkK.VERTICAL)

Expand Down
4 changes: 2 additions & 2 deletions tests/t.ui/test.ui.014.list.03.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def getWord():
# return random.choice(words)

parser = argparse.ArgumentParser()
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk List Demo", mouseTrack=mouseTrack)

Expand Down
4 changes: 2 additions & 2 deletions tests/t.ui/test.ui.014.list.04.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def getWord():
# return random.choice(words)

parser = argparse.ArgumentParser()
parser.add_argument('-t', help='Track Mouse', action='store_true')
parser.add_argument('-t', help="Don't Track Mouse", action='store_true')
args = parser.parse_args()
mouseTrack = args.t
mouseTrack = not args.t

root = ttk.TTk(title="pyTermTk List Demo", mouseTrack=mouseTrack)

Expand Down
Loading