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 |
{ |
{ |