UserPreferences

PyroDocGuiGui


1. pyro.gui.gui

This is the base class for a gui.

In File: pyrobot/gui/init.py

Subclass of: pyro.gui.Drawable (see PyroDocGuiDrawable) in pyrobot/gui/drawable.py

Depends on:

  1. pyro.gui.gui
    1. Constructor(name = 'abstract gui' options = {}, engine = 0)
    2. Internal Functions
      1. _draw(options, renderer)
    3. External Functions
      1. init()
      2. run()
      3. processCommand(retval)
      4. redraw()
      5. fileloaddialog(type, skel)
      6. cleanup()
      7. stepEngine()
      8. runEngine()
      9. stopEngine()
      10. stepForward()
      11. stepBack()
      12. stepLeft()
      13. stepRight()
      14. resetEngine()
      15. loadBrain()
      16. loadPlot()
      17. freeBrain()
      18. loadSim()
      19. freeRobot()
      20. INThandler(signum, frame)
      21. inform(message)

1.1. Constructor(name = 'abstract gui' options = {}, engine = 0)

Child classes should do initialization pertaining to the creation of the GUI in the constructor.

Arguments:

1.2. Internal Functions

1.2.1. _draw(options, renderer)

If the gui need draw something itself it should go here.

Doesn't really do anything

1.3. External Functions

1.3.1. init()

No docstring

Looks like it's made to be overridden in children; in this class, it's just pass

1.3.2. run()

Child classes should do the beef of what they do right here.

1.3.3. processCommand(retval)

No docstring

Arguments:

1.3.4. redraw()

No docstring

=== makeMenu(name, commands):

Could bind a key right here 1, 2, ^3...

Arguments:

This is an abstract function, but it looks like it might take a menu name and a list of menu commands (or maybe a dictionary with functions linked to the command names).

1.3.5. fileloaddialog(type, skel)

Could read a line from user

Arguments:

No idea on how this one's supposed to work

1.3.6. cleanup()

No docstring

Shuts down the engine and exits

1.3.7. stepEngine()

No docstring

Calls self.engine.pleaseStep()

1.3.8. runEngine()

No docstring

Calls self.engine.pleaseRun()

1.3.9. stopEngine()

No docstring

Calls self.engine.pleaseStop()

1.3.10. stepForward()

No docstring

calls self.engine.robot.step('F')

1.3.11. stepBack()

No docstring

calls self.engine.robot.step('B')

1.3.12. stepLeft()

No docstring

calls self.engine.robot.step('L')

1.3.13. stepRight()

No docstring

calls self.engine.robot.step('R')

1.3.14. resetEngine()

No docstring

calls self.engine.reset()

1.3.15. loadBrain()

No docstring

Creates a fileloaddialog, and asks the engine to load the resulting .py file.

1.3.16. loadPlot()

No Docstring

Creates a fileloaddialog, and asks the engine to load the resulting .py file.

1.3.17. freeBrain()

No Docstring

calls self.engine.freeBrain()

1.3.18. loadSim()

Creates a fileloaddialog, and asks the os to run the resulting file in the background

=== loadRobot() ===

No Docstring

Creates a fileloaddialog, and asks the engine to load the resulting .py file.

1.3.19. freeRobot()

No Docstring

calls self.engine.freeRobot()

1.3.20. INThandler(signum, frame)

No Docstring

Arguments:

Simply calls self.cleanup()

1.3.21. inform(message)

No Docstring

Arguments:

Calls self.status.set, passing in the first 50 characters of message.