Skip to content

Commit

Permalink
Merge pull request #124 from jwlodek/v0.1.4-develop
Browse files Browse the repository at this point in the history
WIP - v0.1.4 Development
  • Loading branch information
jwlodek authored Oct 29, 2021
2 parents e5f8651 + f16205c commit f93ea60
Show file tree
Hide file tree
Showing 43 changed files with 2,494 additions and 1,288 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/py_cui_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ npdoc2md/
ecui/
.coverage
py_cui_log.txt
*.log
venv/
.pytest_cache/
demo.py
demo.py
*.log
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# py_cui

`py_cui` is a python library meant to simplify writing console user interfaces in python. It relies on `curses` for terminal rendering, which is traditionally a unix-specific, however, you may use the [windows-curses](https://github.com/zephyrproject-rtos/windows-curses) module to run `py_cui` on windows.
`py_cui` is a python library meant to simplify writing console user interfaces in python. It relies on `curses` for terminal rendering, which is traditionally unix-specific, however, you may use the [windows-curses](https://github.com/zephyrproject-rtos/windows-curses) module to run `py_cui` on windows.

The main advantage `py_cui` has over typical text-based user interface builders is that it relies on widgets and a grid layout manager like most traditional graphical user interfaces. You may define a grid size, and then drop predefined widgets onto it into specific grid locations. Widgets can also be stretched accross multiple grid rows and columns. If you've ever made a Tkinter GUI, you will feel right at home. In addition, `py_cui` has support for a rich collection of interactive popups such as menus, forms, file dialogs, and more.

Expand Down
10 changes: 5 additions & 5 deletions docs/DocstringGenerated/Colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Class representing a text color rendering rule
### __init__

```python
def __init__(self, regex, color, selected_color, rule_type, match_type, region, include_whitespace, logger)
def __init__(self, regex: str, color: int, selected_color: int, rule_type: str, match_type: str, region: List[int], include_whitespace: bool, logger)
```

Constructor for ColorRule object
Expand All @@ -77,7 +77,7 @@ Constructor for ColorRule object
### _check_match

```python
def _check_match(self, line)
def _check_match(self, line: str) -> bool
```

Checks if the color rule matches a line
Expand All @@ -104,7 +104,7 @@ Checks if the color rule matches a line
### _generate_fragments_regex

```python
def _generate_fragments_regex(self, widget, render_text, selected)
def _generate_fragments_regex(self, widget: Union['py_cui.widgets.Widget','py_cui.ui.UIElement'], render_text:str, selected) -> List[List[Union[int,str]]]
```

Splits text into fragments based on regular expression
Expand Down Expand Up @@ -132,7 +132,7 @@ Splits text into fragments based on regular expression
### _split_text_on_region

```python
def _split_text_on_region(self, widget, render_text, selected)
def _split_text_on_region(self, widget: Union['py_cui.widgets.Widget','py_cui.ui.UIElement'], render_text: str, selected) -> List[List[Union[str,int]]]: # renderer._generate_text_color_fragments passes a uielement and not a widge
```

Splits text into fragments based on region
Expand Down Expand Up @@ -160,7 +160,7 @@ Splits text into fragments based on region
### generate_fragments

```python
def generate_fragments(self, widget, line, render_text, selected=False)
def generate_fragments(self, widget: Union['py_cui.widgets.Widget','py_cui.ui.UIElement'], line: str, render_text: str, selected=False) -> Tuple[List[List[Union[str,int]]],bool]
```

Splits text into fragments if matched line to regex
Expand Down
26 changes: 13 additions & 13 deletions docs/DocstringGenerated/Controls/Slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SliderImplementation(py_cui.ui.UIImplementation)
### __init__

```python
def __init__(self, min_val, max_val, init_val, step, logger)
def __init__(self, min_val: int, max_val: int, init_val: int, step: int, logger)
```


Expand All @@ -54,7 +54,7 @@ def __init__(self, min_val, max_val, init_val, step, logger)
### set_bar_char

```python
def set_bar_char(self, char)
def set_bar_char(self, char: str) -> None
```


Expand Down Expand Up @@ -104,7 +104,7 @@ Steps up or down the value in offset fashion.
### get_slider_value

```python
def get_slider_value(self)
def get_slider_value(self) -> float
```


Expand All @@ -126,7 +126,7 @@ Returns current slider value.
### set_slider_step

```python
def set_slider_step(self, step)
def set_slider_step(self, step: int) -> None
```


Expand Down Expand Up @@ -204,7 +204,7 @@ def __init__(self, id, title, grid, row, column, row_span, column_span
### toggle_title

```python
def toggle_title(self)
def toggle_title(self) -> None
```

Toggles visibility of the widget's name.
Expand All @@ -218,7 +218,7 @@ Toggles visibility of the widget's name.
### toggle_border

```python
def toggle_border(self)
def toggle_border(self) -> None
```

Toggles visibility of the widget's border.
Expand All @@ -232,7 +232,7 @@ Toggles visibility of the widget's border.
### toggle_value

```python
def toggle_value(self)
def toggle_value(self) -> None
```

Toggles visibility of the widget's current value in integer.
Expand All @@ -246,7 +246,7 @@ Toggles visibility of the widget's current value in integer.
### align_to_top

```python
def align_to_top(self)
def align_to_top(self) -> None
```

Aligns widget height to top.
Expand All @@ -260,7 +260,7 @@ Aligns widget height to top.
### align_to_middle

```python
def align_to_middle(self)
def align_to_middle(self) -> None
```

Aligns widget height to middle. default configuration.
Expand All @@ -274,7 +274,7 @@ Aligns widget height to middle. default configuration.
### align_to_bottom

```python
def align_to_bottom(self)
def align_to_bottom(self) -> None
```

Aligns widget height to bottom.
Expand All @@ -288,7 +288,7 @@ Aligns widget height to bottom.
### _custom_draw_with_border

```python
def _custom_draw_with_border(self, start_y: int, content: str)
def _custom_draw_with_border(self, start_y: int, content: str) -> None
```


Expand Down Expand Up @@ -339,7 +339,7 @@ Internal implementation to generate progression bar.
### _draw

```python
def _draw(self)
def _draw(self) -> None
```

Override of base class draw function.
Expand All @@ -353,7 +353,7 @@ Override of base class draw function.
### _handle_key_press

```python
def _handle_key_press(self, key_pressed)
def _handle_key_press(self, key_pressed: int) -> None
```


Expand Down
Loading

0 comments on commit f93ea60

Please sign in to comment.