class documentation

class GtkCommand(Command): (source)

Known subclasses: zim.main.GuiCommand, zim.main.ServerGuiCommand

View In Hierarchy

Base class for commandline commands that result in a Gtk user interface being presented to the user or want to interact with the Gtk user interface.

If the run() method returns a window, it will be added to the application top level windows. And a Gtk.main loop will run until all windows are destroyed.

Commands derived from this class can be dispatched to the main application process. This is controlled by the standalone_process property.

NOTE: Do _not_ call Gtk.main from the command, this will be done by the application object.

Method run_local No summary
Class Variable default_options Undocumented
Property standalone_process Undocumented

Inherited from Command:

Method __init__ Constructor @param command: the command switch (first commandline argument) @param pwd: optional working directory path
Method get_arguments Get the arguments, to be used by the implementation of run() @raises UsageError: when arguments are not correct @returns: tuple of arguments, padded with None to correct length
Method get_options Retrieve a dict with a sub-set of the command options @param names: that options in the subset
Method ignore_options Undocumented
Method parse_options No summary
Method run Run the command @raises UsageError: when arguments are not correct @implementation: must be implemented by subclasses
Class Variable arguments Undocumented
Class Variable options Undocumented
Instance Variable args Undocumented
Instance Variable command Undocumented
Instance Variable opts Undocumented
Instance Variable pwd Undocumented
def run_local(self): (source)
Method called in local process before we (try to) dispatch the command to the primary process. If it returns True we assume the command is done and run() is not called. If the command is called from the primary process directly, this method gets never called.
default_options = (source)
@property
standalone_process = (source)

Undocumented