Skip to content

Commit

Permalink
Merge pull request #182 from lawsie/dev
Browse files Browse the repository at this point in the history
v0.5.1
  • Loading branch information
Martin O'Hanlon authored May 14, 2018
2 parents 7b92403 + 9a5b687 commit 6a0c43b
Show file tree
Hide file tree
Showing 105 changed files with 2,603 additions and 346 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# guizero

[Version 0.5.0](http://lawsie.github.io/guizero/changelog) (10th April 2018)
[Version 0.5.1](http://lawsie.github.io/guizero/changelog) (14th May 2018)

guizero is designed to allow children to quickly and easily create GUIs for their programs.

Expand Down
9 changes: 9 additions & 0 deletions debian_jessie/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
guizero (0.5.1~jessie-1) unstable; urgency=low

* added ListBox
* cascading properties
* bug fixes
* doc fixes

-- Martin OHanlon <[email protected]> Mon, 14 May 2018 07:00:00 +0100

guizero (0.5.0~jessie-1) unstable; urgency=low

* multiple window support
Expand Down
9 changes: 9 additions & 0 deletions debian_stretch/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
guizero (0.5.1~stretch-1) unstable; urgency=low

* added ListBox
* cascading properties
* bug fixes
* doc fixes

-- Martin OHanlon <[email protected]> Mon, 14 May 2018 07:00:00 +0100

guizero (0.5.0~stretch-1) unstable; urgency=low

* multiple window support
Expand Down
8 changes: 4 additions & 4 deletions docs-src/docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

### Aims

The aim of guizero is to make the process of creating simple GUIs quick, accessible and understandable for children.
The aim of guizero is to make the process of creating simple GUIs quick, accessible and understandable for new learners.

* Works with standard Python Tkinter GUI library (and no need to install other libraries)
* Abstracts away details children find difficult to understand (such as Tkinter StringVar() objects)
* Accessible widget naming system to help children to build up a mental model
* Abstracts away details new learners find difficult to understand (such as Tkinter StringVar() objects)
* Accessible widget naming system to help new learners to build up a mental model
* Flexible enough to be used for projects up to A-Level standard, yet accessible to primary school children
* Comprehensive and accessible documentation with examples
* Generates helpful additional error messages

### Version

guizero is currently [version 0.5.0](changelog.md)
guizero is currently [version 0.5.1](changelog.md)

There may be bugs and features may change and be updated.
4 changes: 4 additions & 0 deletions docs-src/docs/alerts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Alerts

Alerts are pop-up windows which can be used to interupt the user by asking question or providing information.

![Alert popup](images/alert_info_windows.png)

### Using alerts
To use the alerts you will need to import each one individually at the start of your program. For example:

Expand Down
10 changes: 8 additions & 2 deletions docs-src/docs/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(Contains a `tkinter.Tk` object)

`__init__(self, title="guizero", width=500, height=500, layout="auto", bgcolor=None, bg=None)`
`__init__(self, title="guizero", width=500, height=500, layout="auto", bgcolor=None, bg=None, visible=True)`

### What is it?
The `App` object is the basis of all GUIs created using guizero. It is the main window which contains all of the other widgets.
Expand All @@ -25,7 +25,8 @@ When you create an `App` object you can specify any of the following parameters,

| Parameter | Data type | Default | Compulsory | Description |
| --------- | --------- | ------- | ---------- | -------------------------|
| bg | [color](colors.md) | None | No | The background colour of the app window. Takes a [color](colors.md) value. |
| bg | [color](colors.md) | None | No | The background colour of the app window and widgets inside it. Takes a [color](colors.md) value. |
| font | string | The font of the text widgets should use |
| height | int | 500 | No | The height of the window in pixels. |
| layout | string | "auto" | No | Whether widgets pack themselves (`"auto"`) or you specify their position on a grid (`"grid"`) |
| title | string | "guizero" | No | The title displayed in the bar at the top of the window. |
Expand All @@ -44,7 +45,9 @@ You can call the following methods on an `App` object.
| after(time, command) | time (int), command (function name) | - | Schedules a **single** call to `command` after `time` milliseconds. (To repeatedly call the same command, use `repeat()`) |
| cancel(command) | command (function name) | - | Cancels a scheduled call to `command` |
| destroy() | - | - | Destroys the widget |
| disable() | - | - | Disables all the widgets in the app so that they cannot be interacted with |
| display() |- | - | Displays the app on the screen. You **MUST** call this method at the end of your program to display the app on the screen. |
| enable() | - | - | Enables all the widgets in the app |
| focus() | - | - | Gives focus to the widget |
| hide() | - | - | Hides the app window from view. |
| on_close(command) | command (function name) | - | Calls the given function when the user tries to close the window. |
Expand All @@ -62,9 +65,12 @@ You can set and get the following properties:
| Method | Data type | Description |
| ------------- | ----------- | -------------------------- |
| bg | [color](colors.md) | The background colour of the window |
| enabled | boolean | `True` if the app is enabled |
| height | int | The height of the window |
| layout | string | The layout being used by the App (`"auto"`) or (`"grid"`) |
| title | string | The title of the window |
| text_size | int | The size of the text widgets should use |
| text_color | [color](colors.md) | The colour of the text widgets should use |
| visible | boolean | If the app is visible |
| width | int | The width of the window |

Expand Down
9 changes: 8 additions & 1 deletion docs-src/docs/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(Contains a `tkinter.Frame` object)

`__init__(self, master, layout="auto", grid=None, align=None)`
`__init__(self, master, layout="auto", grid=None, align=None, visible=True, enabled=None)`

### What is it?
The `Box` object is an invisible container which can contain other widgets. It is the only object other than `App` which can act as the `master` for other objects and can have its own layout manager.
Expand Down Expand Up @@ -31,6 +31,7 @@ When you create a `Box` object you **must** specify a master, and you can specif
| grid | List | None | - | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid layout. |
| layout | string | "auto" | - | Whether widgets *inside this box* pack themselves (`"auto"`) or you specify their position on a grid (`"grid"`) |
| visible | boolean | True | No | If the widget should be visible. |
| enabled | boolean | None | No | If the widget should be enabled. If `None` (the default) the enabled property will be inherited from the master |


### Methods
Expand All @@ -41,7 +42,9 @@ You can call the following methods on a `Box` object.
| ------------- | --------- | ---------- | -------------------------- |
| after(time, command) | time (int), command (function name) | - | Schedules a **single** call to `command` after `time` milliseconds. (To repeatedly call the same command, use `repeat()`) |
| cancel(command) | command (function name) | - | Cancels a scheduled call to `command` |
| disable() | - | - | Disables all the widgets in the box so that they cannot be interacted with |
| destroy() | - | - | Destroys the widget |
| enable() | - | - | Enables all the widgets in the box |
| focus() | - | - | Gives focus to the widget (e.g. focusing a `TextBox` so that the user can type inside it) |
| hide() | - | - | Hides the widget from view. This method will unpack the widget from the layout manager. |
| repeat(time, command) | time (int), command (function name) | - | Repeats `command` every `time` milliseconds. This is useful for scheduling a function to be regularly called, for example updating a value read from a sensor. |
Expand All @@ -56,10 +59,14 @@ You can set and get the following properties:
| ------------- | ----------- | -------------------------- |
| align | string | The alignment of this widget within its grid location |
| bg | [color](colors.md) | The background colour of the widget |
| enabled | boolean | `True` if the box is enabled |
| grid | List | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid |
| font | string | The font of the text widgets should use |
| height | [size](size.md) | Sets the height of the widget |
| layout | string | The layout being used by the Box (`"auto"`) or (`"grid"`) |
| master | App | The `App` object to which this box belongs |
| text_size | int | The size of the text widgets should use |
| text_color | [color](colors.md) | The colour of the text widgets should use |
| visible | boolean | If this widget is visible |
| width | [size](size.md) | Sets the width of the widget |

Expand Down
4 changes: 2 additions & 2 deletions docs-src/docs/buttongroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(Contains a `tkinter.Frame` object)

`__init__(self, master, options, selected, horizontal=False, command=None, grid=None, align=None, args=None)`
`__init__(self, master, options, selected, horizontal=False, command=None, grid=None, align=None, args=None, visible=True, enabled=None)`

### What is it?
The `ButtonGroup` object displays a group of radio buttons, allowing the user to choose a single option.
Expand Down Expand Up @@ -35,7 +35,7 @@ When you create a `ButtonGroup` object you **must** specify `master` and `otions
| grid | list [int, int] | None | - | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid layout. |
| horizontal | boolean | False | - | Whether the buttons stack vertically or horizontally. (Defaults to vertical)|
| visible | boolean | True | No | If the widget should be visible. |
| enabled | boolean | True | No | If the widget should be enabled. |
| enabled | boolean | None | No | If the widget should be enabled. If `None` (the default) the enabled property will be inherited from the master |

### Methods

Expand Down
14 changes: 14 additions & 0 deletions docs-src/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# guizero

## 0.5.1 - 14 May 2018

- App, Window, Box now support the following properties and will cascade them to widgets within them:
- `bg`
- `text_color`
- `text_size`
- `font`
- `enabled`
- Introduced `ListBox`
- Bug fixes relating to `bg` and `text_color` causing widgets to change colour when selected
- Minor bug fixes with `CheckBox`, `Waffle` and `Combo`
- Documentation fixes and updates
- contributors to this release [martinohanlon](https://github.com/martinohanlon), [lawsie](https://github.com/lawsie), [Harlekuin](https://github.com/Harlekuin)

## 0.5.0 - 2018-04-10

- v0.5.0 includes significant refactoring of the guizero code base and introduces many new features
Expand Down
4 changes: 2 additions & 2 deletions docs-src/docs/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(Contains a `tkinter.Checkbutton` object)

`__init__(self, master, text, command=None, grid=None, align=None, args=None)`
`__init__(self, master, text, command=None, grid=None, align=None, args=None, visible=True, enabled=None)`

### What is it?
The `CheckBox` object displays a check box to allow an option to be ticked or unticked
Expand Down Expand Up @@ -33,7 +33,7 @@ When you create a `CheckBox` object you **must** specify `master` and `text` and
| args | list | None | - | If you wish to pass any arguments to the function specified in the command parameter, you can specify them as a list |
| grid | List [int, int] | None | - | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid layout. |
| visible | boolean | True | No | If the widget should be visible. |
| enabled | boolean | True | No | If the widget should be enabled. |
| enabled | boolean | None | No | If the widget should be enabled. If `None` (the default) the enabled property will be inherited from the master |


### Methods
Expand Down
4 changes: 2 additions & 2 deletions docs-src/docs/combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(Contains a `tkinter.OptionMenu` object)

`__init__(self, master, options, selected=None, command=None, grid=None, align=None)`
`__init__(self, master, options, selected=None, command=None, grid=None, align=None, visible=True, enabled=None)`

### What is it?
The `Combo` object displays a drop down box allowing a single option to be selected from a list of options.
Expand Down Expand Up @@ -33,7 +33,7 @@ When you create a `Combo` object you **must** specify `master` and `options` and
| command | function name | None | - | The name of a function to call when a different option is selected. This function MUST take either zero or one argument, if the function takes one argument the current value of the Combo will be given.
| grid | List [int, int] | None | - | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid layout. |
| visible | boolean | True | No | If the widget should be visible. |
| enabled | boolean | True | No | If the widget should be enabled. |
| enabled | boolean | None | No | If the widget should be enabled. If `None` (the default) the enabled property will be inherited from the master |



Expand Down
18 changes: 14 additions & 4 deletions docs-src/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

Notes on how to develop guizero (on Windows).

## Install Pre-requisites
## Upgrade pip

```
pip install mkdocs wheel twine virtualenv pytest pillow
python.exe -m pip install pip --upgrade
```

## Install / Upgrade Pre-requisites

```
pip install mkdocs wheel twine virtualenv pytest pillow --upgrade
```

## Python library
Expand Down Expand Up @@ -48,9 +54,13 @@ cd guizero\test
pytest -v
```

_Note - tkinter can error when running the tests usually when the interpreter doesn't start properly, it doesnt seem to like being initialised and destroyed hundreds of times, I suspect a file locking issue as you dont see the problem on Linux. So sometimes you might get a test fail with an error like `This probably means that tk wasn't installed properly.`._
If running the tests inside a virtual environment you will need to install pytest in that virtual enviroment.

```
pip install pytest
```

_Just give it a re-run!_
_Note - tkinter can error when running the tests usually when the interpreter doesn't start properly, it doesnt seem to like being initialised and destroyed hundreds of times, I suspect a file locking issue as you dont see the problem on Linux. So sometimes you might get a test fail with an error like `This probably means that tk wasn't installed properly.`. Just give it a re-run!_

## Documents

Expand Down
Binary file added docs-src/docs/images/alert_info_windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs-src/docs/images/guizero-class-hierarchy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-src/docs/images/listbox_windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs-src/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

guizero is designed to allow children to quickly and easily create GUIs for their programs.
guizero is designed to allow new learners to quickly and easily create GUIs for their programs.

If you can download and unzip a file, you can [install guizero](#easy-installation) - **no special permissions or administrator rights are required**.

Expand Down
Loading

0 comments on commit 6a0c43b

Please sign in to comment.