= wxGUI API proposal = The proposal does not have to be complete and there can be several different proposals. (All can be listed in different sections on this page for now; if too long a subpage should be created and linked here.) The API should be used for communication between objects in the wxGUI, for creating new GUI applications (and GUI addons/plugins) and for controlling the wxGUI from the embedded Python command line. == Short proposal based on the current state of refactoring == {{{ #!python class Layer(object): class LayerList(object): def GetSelectedLayers(self, checkedOnly=True): # GrassInterface is a root in the tree of objects/interfaces which compose API # provides the functionality which should be available to every GUI component # and is expected to be passed to almost all objects class GrassInterface: def RunCmd(self, *args, **kwargs): def Help(self, entry): def WriteLog(self, text, wrap=None, priority=1): """The meaning and usage of priority is not clear""" def WriteCmdLog(self, line, pid=None, switchPage=True): def WriteWarning(self, line): def WriteError(self, line): def GetLayerList(self): def GetMapDisplay(self): def GetAllMapDisplays(self): def GetMapWindow(self): # more classes should be defined... }}}