X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Frenderingsurface.h;h=1c7ebff77251ee9bd8d5290b7372b17305c3107b;hb=68a7b857d7778c1a7b33d916d062de317fdd5069;hp=d6e8f164270db88c555d23dd9d337e0691f9fa11;hpb=3025996ba17bf59f5bc64def5d55b95c4d732a8a;p=lsystem3d.git diff --git a/src/renderingsurface.h b/src/renderingsurface.h index d6e8f16..1c7ebff 100644 --- a/src/renderingsurface.h +++ b/src/renderingsurface.h @@ -1,6 +1,6 @@ // Copyright (C) 2006 Erik Dahlberg // -// This file is part of LSystem3d. +// This file is part of LSystem3D. // // LSystem3D is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -45,18 +45,24 @@ public: ID_CANVAS = FXMainWindow::ID_LAST, ID_LAST }; - + + /** * Constructor - * @param application the FOX application object - * @param lsystem the Lindenmayer-system + * @param application the application object */ - RenderingSurface(FXApp *application, LindenmayerSystem *lsystem); - + RenderingSurface(FXApp *application); + + /** + * Destructor + */ + virtual ~RenderingSurface(); + + /** * Create and initialize the window */ - void create(); + virtual void create(); /** * Initialize OpenGL @@ -68,6 +74,7 @@ public: */ void draw(); + /** * Called by the system when the left mouse button is pressed * @param sender the sender object @@ -139,6 +146,22 @@ public: * @return */ long onRepaint(FXObject *sender, FXSelector selector, void *data); + + /** + * Called by the system when the close button is pressed + * @param sender the sender object + * @param selector message type and id + * @param data event related data + * @return + */ + long onQuit(FXObject *sender, FXSelector selector, void *data); + + + /** + * Set current L-system generator + * @param lsystem the L-system generator + */ + void setLSystem(LindenmayerSystem *lsystem); protected: @@ -147,12 +170,12 @@ protected: */ RenderingSurface() {} -private: FXGLVisual *_visual; // Pixel format info FXGLCanvas *_canvas; // OpenGL-capable drawing area - LindenmayerSystem *_lsystem; // The Lindenmayer System + LindenmayerSystem *_lsystem; // The Lindenmayer system generator + // Model position double _modelX,