kiwi.controllers.BaseController
class documentationkiwi.controllers
(View In Hierarchy)
Known subclasses: kiwi.ui.delegates.Delegate, kiwi.ui.delegates.GladeDelegate, kiwi.ui.delegates.GladeSlaveDelegate, kiwi.ui.delegates.SlaveDelegate
A generic controller that can be attached to any View BaseController defines one public variable: - view: corresponds to a the associated View instance, which holds the UI implementation itself (widgets, layout, etc.)
Method | __init__ | No summary |
Method | on_key_press | The keypress handler, which dispatches keypresses to the functions mapped to in self.keyactions |
Method | get_parent | parent: the correspondent parent for the controller |
Method | set_parent | parent: the correspondent parent for the controller |
Method | get_view | view: the correspondent view for the controller |
Method | set_view | view: the correspondent view for the controller |
Method | set_keyactions | Sets the keyactions mapping. See the constructor documentation for a description of it. |
Method | update_keyactions | XXX |
Method | _get_all_methods | Undocumented |
Creates a new controller, and attaches itself to a view. The constructor triggers a view.set_constructor(self) call, so the view is also attached to it. The arguments are identical to the view and keyactions class variables. - view: the correspondent view for the controller - keyactions: a mapping from GDK key symbol (GDK.A, etc.) to a method. The method will be called when any relevant keypress is generated for that view. The handler definition should look like: >>> def my_A_handler(self, widget, event, args):
The keypress handler, which dispatches keypresses to the functions mapped to in self.keyactions