/[adonthell]/adonthell/src/py-wrappers/adonthell/py_main.h
ViewVC logotype

Diff of /adonthell/src/py-wrappers/adonthell/py_main.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by ksterker, Mon Aug 23 06:33:47 2004 UTC revision 1.3 by ksterker, Mon Nov 1 17:41:30 2004 UTC
# Line 40  Line 40 
40   * following way:   * following way:
41   *   *
42   * \code   * \code
43   * from adonthell import main   *   from adonthell import main
44   *   *
45   * class myApp:   *   class App (main.AdonthellApp):
46   *    # -- ctor   *       def __init__ (self):
47   *    def __init__ (self, app):   *           main.AdonthellApp.__init__ (self)
  *        self.App = app ()  
  *          
  *    # -- your application entry point  
  *    def main (self):  
  *        self.App.init_modules (self.App.GFX | ...)  
  *        ...  
48   *   *
49   * if __name__ == 'main':   *       # -- your application entry point
50   *      adonthellApp = main.AdonthellApp ()   *       def main (self):
51   *      app = myApp (adonthellApp)   *           self.init_modules (self.GFX | ...)
52   *      adonthellApp.init (app.main)   *           ...
53   * \endcode   *
54     *   if __name__ == '__main__':
55     *       theApp = App ()
56     *       theApp.init (theApp.main) * \endcode
57   *   *
58   * This will ensure that your python scripts run on any platform supported by the   * This will ensure that your python scripts run on any platform supported by the
59   * Adonthell framework.   * Adonthell framework.
60   *   *
61   * \note code after \tt myApp.init will not be executed.   * \note code after \tt theApp.init(...) will not be executed.
62   */   */
63  class AdonthellApp : public adonthell::app  class AdonthellApp : public adonthell::app
64  {  {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26