Scribe

This is a test in blog driven development. In short, I will work on a project by explaining my rationale in blog form first and then follow by implementing what was written.

The project I will be working on will be an experimental GUI system that allows adding and removing widgets as well as editing their behavior in real time while the application is running. I will be using Python and PyQt for the project. The name of the project is Scribe.

Design Goals

My main motivation for this project is to build a system that allows me to create a simple GUI application very quickly. Think creating a calculator or a simple to-do list in 10 minutes time with a reasonably looking gui. To my knowledge such a program/system does not exist which makes this an actually interesting project to attempt.

To start off with, Scribe should allow creating a GUI entirely visually, from scratch. This would mean it would need some way to store and load the gui logic external to the application’s core.

Example work flow:

Start a new Scribe application. This would provide a blank canvas window. Press F12 to trigger dev mode of the gui. A new window will popup giving you the ability to add, remove, and edit widgets (perhaps something like Gimp’s toolbrush window). Select the Button widget and click on the main application to place it. The button will have a name that you will have to provide. Then add a label widget and name it “counter”. Add a local variable “count” for this widget. Clicking on the button will select it and allow further editing. Here you can write code that references the “counter” label and also handles on_click events:

def on_click(self):
counter.count += 1
counter.redraw()

This will update the counter’s count and force a redraw. The counter will have code similar to:

def __init__(self):
self.count = 0
def draw(self):
return str(self.count)

Even this seems a bit too complicated of a workflow so hopefully it could be simplified.

The next entry will be the first implementation blog so that will be exciting!