console-window 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {console_window-1.0.1 → console_window-1.0.2}/PKG-INFO +3 -3
- {console_window-1.0.1 → console_window-1.0.2}/README.md +2 -2
- {console_window-1.0.1 → console_window-1.0.2}/console_window/ConsoleWindow.py +3 -2
- {console_window-1.0.1 → console_window-1.0.2}/pyproject.toml +1 -1
- {console_window-1.0.1 → console_window-1.0.2}/.gitignore +0 -0
- {console_window-1.0.1 → console_window-1.0.2}/LICENSE +0 -0
- {console_window-1.0.1 → console_window-1.0.2}/console_window/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: console-window
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A robust curses wrapper for creating Text User Interfaces (TUIs).
|
|
5
5
|
Author-email: Joe Defen <joedef@duck.com>
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -46,7 +46,7 @@ This example demonstrates setting up the window, using the `OptionSpinner` for c
|
|
|
46
46
|
|
|
47
47
|
```python
|
|
48
48
|
import curses
|
|
49
|
-
from
|
|
49
|
+
from console_window import ConsoleWindow, OptionSpinner
|
|
50
50
|
|
|
51
51
|
def main_app_loop(stdscr):
|
|
52
52
|
# 1. Setup Options Manager
|
|
@@ -62,7 +62,7 @@ def main_app_loop(stdscr):
|
|
|
62
62
|
other_keys = {ord('q'), ord('Q')}
|
|
63
63
|
|
|
64
64
|
# 2. Initialize Window
|
|
65
|
-
win =
|
|
65
|
+
win = ConsoleWindow(head_line=True, keys=spin.keys^other_keys)
|
|
66
66
|
opts.name = "[hit 'n' to enter name]"
|
|
67
67
|
loop_count = 0
|
|
68
68
|
|
|
@@ -32,7 +32,7 @@ This example demonstrates setting up the window, using the `OptionSpinner` for c
|
|
|
32
32
|
|
|
33
33
|
```python
|
|
34
34
|
import curses
|
|
35
|
-
from
|
|
35
|
+
from console_window import ConsoleWindow, OptionSpinner
|
|
36
36
|
|
|
37
37
|
def main_app_loop(stdscr):
|
|
38
38
|
# 1. Setup Options Manager
|
|
@@ -48,7 +48,7 @@ def main_app_loop(stdscr):
|
|
|
48
48
|
other_keys = {ord('q'), ord('Q')}
|
|
49
49
|
|
|
50
50
|
# 2. Initialize Window
|
|
51
|
-
win =
|
|
51
|
+
win = ConsoleWindow(head_line=True, keys=spin.keys^other_keys)
|
|
52
52
|
opts.name = "[hit 'n' to enter name]"
|
|
53
53
|
loop_count = 0
|
|
54
54
|
|
|
@@ -764,7 +764,7 @@ class ConsoleWindow:
|
|
|
764
764
|
width = self.scroll_view_size/self.body.row_cnt*self.cols
|
|
765
765
|
bot = max(int(round(ind_pos-width/2)), 1)
|
|
766
766
|
top = min(int(round(ind_pos+width/2)), self.cols-1)
|
|
767
|
-
cnt = top - bot
|
|
767
|
+
cnt = max(top - bot, 1)
|
|
768
768
|
# self.scr.addstr(self.head.view_cnt, bot, '-'*cnt, curses.A_REVERSE)
|
|
769
769
|
# self.scr.hline(self.head.view_cnt, bot, curses.ACS_HLINE, curses.A_REVERSE, cnt)
|
|
770
770
|
for idx in range(bot, bot+cnt):
|
|
@@ -1030,12 +1030,13 @@ if __name__ == '__main__':
|
|
|
1030
1030
|
other_keys = {0x3, ord('q')}
|
|
1031
1031
|
|
|
1032
1032
|
win = ConsoleWindow(head_line=True, keys=spin.keys^other_keys,
|
|
1033
|
-
ctrl_c_terminates=False)
|
|
1033
|
+
ctrl_c_terminates=False, body_rows=4000)
|
|
1034
1034
|
opts.name = ""
|
|
1035
1035
|
opts.prev_pick = 'n/a'
|
|
1036
1036
|
pick_values = []
|
|
1037
1037
|
for loop in range(100000000000):
|
|
1038
1038
|
body_size = int(round(win.scroll_view_size*opts.mult))
|
|
1039
|
+
# body_size = 4000 # temp to test scroll pos indicator when big
|
|
1039
1040
|
if opts.help_mode:
|
|
1040
1041
|
win.set_pick_mode(False)
|
|
1041
1042
|
spin.show_help_nav_keys(win)
|
|
@@ -23,7 +23,7 @@ name = "console_window"
|
|
|
23
23
|
# UNIFIED PROJECT METADATA (Replaces [tool.flit.metadata])
|
|
24
24
|
[project]
|
|
25
25
|
name = "console-window"
|
|
26
|
-
version = "1.0.
|
|
26
|
+
version = "1.0.2"
|
|
27
27
|
description = "A robust curses wrapper for creating Text User Interfaces (TUIs)."
|
|
28
28
|
readme = "README.md"
|
|
29
29
|
requires-python = ">=3.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|