From: W. Trevor King Date: Fri, 18 Jun 2010 13:10:34 +0000 (-0400) Subject: Started converting GUI to new UserInterface architecture X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cd6a499f050e1167ae552d264a5715dccf8db428;p=hooke.git Started converting GUI to new UserInterface architecture --- diff --git a/hooke/ui/gui/__init__.py b/hooke/ui/gui/__init__.py index 803f29c..310902f 100644 --- a/hooke/ui/gui/__init__.py +++ b/hooke/ui/gui/__init__.py @@ -1 +1,39 @@ -#!/usr/bin/env python +# Copyright + +"""Defines :class:`GUI` providing a wxWindows interface to Hooke. +""" + +from ..command import CommandExit, Exit, Command, Argument, StoreValue +from ..interaction import Request, BooleanRequest, ReloadUserInterfaceConfig +from ..ui import UserInterface, CommandMessage +from ..util.encoding import get_input_encoding, get_output_encoding + + +class GUI (UserInterface): + """wxWindows graphical user interface. + """ + def __init__(self): + super(GUI, self).__init__(name='gui') + + def default_settings(self): + """Return a list of :class:`hooke.config.Setting`\s for any + configurable UI settings. + + The suggested section setting is:: + + Setting(section=self.setting_section, help=self.__doc__) + """ + return [] + + def reload_config(self): + pass + + def run(self, commands, ui_to_command_queue, command_to_ui_queue): + self._initialize() + cmd = self._cmd(commands, ui_to_command_queue, command_to_ui_queue) + cmd.cmdloop(self._splash_text()) + + def run_lines(self, commands, ui_to_command_queue, command_to_ui_queue, + lines): + raise NotImplementedError( + 'Use the command line interface for run_lines()')